:root {
  --brand: var(--color-action);
  --brand-light: var(--color-accent);
  --brand-glow: rgba(21, 101, 192, 0.25);
}

#mgeid-hero {
  font-family: var(--font-sans);
  position: relative;
  width: 100%;
  min-height: min(100svh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0f1e 0%, #0d1b2e 50%, #0a0f1e 100%);
  color: #fff;
}

#mgeid-hero .hero-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
}

#mgeid-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

@keyframes heroFadeUp {
  from {
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes photoPop {
  from {
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.hero-badge {
  animation: heroFadeUp 0.7s 0.1s ease both;
}
.hero-name {
  animation: heroFadeUp 0.7s 0.2s ease both;
}
.hero-title {
  animation: heroFadeUp 0.7s 0.3s ease both;
}
.hero-bio {
  animation: heroFadeUp 0.7s 0.4s ease both;
}
.hero-btns {
  animation: heroFadeUp 0.7s 0.5s ease both;
}
.hero-stats {
  animation: heroFadeUp 0.7s 0.6s ease both;
}
.hero-photo {
  animation: photoPop 0.8s 0.2s ease both;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.15);
  border: 1px solid rgba(21, 101, 192, 0.35);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-light);
  width: fit-content;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.photo-wrap {
  position: relative;
  display: inline-block;
}
.photo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  opacity: 0.5;
}
.photo-circle {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(21, 101, 192, 0.4);
  box-shadow:
    0 0 40px var(--brand-glow),
    0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}
.photo-circle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.photo-tag {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-sans);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.photo-tag-top {
  top: 10px;
  inset-inline-end: -16px;
  background: var(--brand);
  color: #fff;
}
.photo-tag-bottom {
  bottom: 10px;
  inset-inline-start: -16px;
  background: rgba(15, 25, 50, 0.9);
  color: #fff;
  border: 1px solid rgba(21, 101, 192, 0.3);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px var(--brand-glow);
}
.btn-primary:hover {
  background: var(--color-action-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--brand-glow);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  border-color: var(--brand);
  background: rgba(21, 101, 192, 0.1);
  transform: translateY(-2px);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-item {
  text-align: start;
}
.stat-num {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: #b7c5d7;
  margin-top: 2px;
}
.stat-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
  align-self: stretch;
}

@media (max-width: 1023px) {
  .hero-grid {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-grid .hero-left {
    align-items: center;
  }
  .status-badge {
    margin: 0 auto;
  }
  .stats-row {
    justify-content: center;
  }
  .photo-circle {
    width: 220px;
    height: 220px;
  }
  .photo-tag-top {
    inset-inline-end: -8px;
  }
  .photo-tag-bottom {
    inset-inline-start: -8px;
  }
}
#mgeid-books,
#mgeid-connect,
#mgeid-what {
  scroll-margin-top: 80px;
}

#mgeid-what {
  font-family: var(--font-sans);
  position: relative;
  width: 100%;
  background: #f8fafc;
  overflow: hidden;
}

#mgeid-what .what-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 40px;
}

.what-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-action);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.what-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-action);
  border-radius: 2px;
}

.what-h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.what-h2 span {
  color: var(--color-action);
}
.what-subtitle {
  font-size: 17px;
  color: #526276;
  max-width: 580px;
  line-height: 1.8;
  margin: 0 0 56px;
}

.what-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.what-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  overflow: hidden;
}
.what-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: var(--color-action);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.what-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 16px 48px rgba(21, 101, 192, 0.1);
  transform: translateY(-4px);
}
.what-card:hover::after {
  transform: scaleX(1);
}

.what-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-action);
}
.what-card-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
}
.what-card-text {
  font-size: 15px;
  color: #526276;
  line-height: 1.75;
  margin: 0 0 20px;
}

.what-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.what-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-action);
  background: #eff6ff;
  border-radius: 999px;
  padding: 4px 12px;
}

@media (max-width: 768px) {
  #mgeid-what .what-container {
    padding: 64px 20px;
  }
  .what-grid {
    grid-template-columns: 1fr;
  }
}
#mgeid-books {
  font-family: var(--font-sans);
  position: relative;
  width: 100%;
  background: #f1f5f9;
  overflow: hidden;
}
#mgeid-books .books-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 40px;
}
.books-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-action);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.books-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-action);
  border-radius: 2px;
}
.books-h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.books-h2 span {
  color: var(--color-action);
}
.books-subtitle {
  font-size: 16px;
  color: #526276;
  max-width: 560px;
  line-height: 1.8;
  margin: 0 0 56px;
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.book-card {
  background: #ffffff;
  border: 2px solid #f1f5f9;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 20px 60px rgba(21, 101, 192, 0.1);
  transform: translateY(-6px);
}
.book-cover {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.book-cover img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.4s ease;
}
.book-card:hover .book-cover img {
  transform: scale(1.05);
}
.cover-soon {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.book-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.book-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.badge-free {
  background: #dcfce7;
  color: #15803d;
}
.badge-paid {
  background: #fef3c7;
  color: #b45309;
}
.badge-soon {
  background: #eff6ff;
  color: var(--color-action-hover);
}
.badge-udemy {
  background: #eff6ff;
  color: var(--color-action-hover);
}
.badge-lang {
  background: #f1f5f9;
  color: #526276;
}
.badge-year {
  background: #eff6ff;
  color: var(--color-action);
}
.book-title-ar {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px;
  line-height: 1.3;
  direction: rtl;
}
.book-title-en {
  font-size: 12px;
  font-weight: 600;
  color: #526276;
  margin: 0;
  line-height: 1.4;
}
.book-desc {
  font-size: 13px;
  color: #526276;
  line-height: 1.75;
  margin: 0;
  flex: 1;
}
.book-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}
.btn-udemy {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: var(--color-action);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-udemy:hover {
  background: var(--color-action-hover);
}
.btn-udemy-outline {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: transparent;
  color: var(--color-action);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  border: 2px solid var(--color-action);
  transition: all 0.2s;
}
.btn-udemy-outline:hover {
  background: #eff6ff;
  color: var(--color-action-hover);
}
.btn-disabled {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: #f1f5f9;
  color: #526276;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  cursor: not-allowed;
}
@media (max-width: 768px) {
  #mgeid-books .books-container {
    padding: 64px 20px;
  }
  .books-grid {
    grid-template-columns: 1fr;
  }
}
#mgeid-connect {
  font-family: var(--font-sans);
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #0a0f1e 0%, #0d1b2e 50%, #0a0f1e 100%);
  overflow: hidden;
  color: #fff;
}
#mgeid-connect::after {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(21, 101, 192, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
#mgeid-connect .connect-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 96px 40px;
  text-align: center;
}

.connect-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.connect-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-action);
  border-radius: 2px;
}
.connect-h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.connect-h2 span {
  color: var(--color-accent);
}
.connect-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 520px;
  margin: 0 auto 52px;
  line-height: 1.8;
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
  text-align: start;
}
.connect-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s ease;
}
.connect-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(21, 101, 192, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.connect-btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.connect-btn-text {
  flex: 1;
}
.connect-btn-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
}
.connect-btn-sub {
  font-size: 12px;
  color: #b7c5d7;
  margin: 0;
}
.connect-btn-arrow {
  color: #b7c5d7;
  transition: color 0.2s;
  flex-shrink: 0;
}
.connect-btn:hover .connect-btn-arrow {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  #mgeid-connect .connect-container {
    padding: 64px 20px;
  }
  .connect-grid {
    grid-template-columns: 1fr;
  }
}
.connect-h2 {
  color: #fff;
}

.hero-blob--top {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
  background: rgba(21, 101, 192, 0.12);
}
.hero-blob--bottom {
  width: 400px;
  height: 400px;
  bottom: -80px;
  left: -80px;
  background: rgba(21, 101, 192, 0.08);
}
.hero-grid {
  display: flex;
  gap: 64px;
  align-items: center;
  justify-content: space-between;
}
.hero-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-eyebrow {
  color: var(--brand-light);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
}
.hero-heading {
  color: #fff;
  margin: 0;
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
}
.hero-heading__accent {
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-profession {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-light);
}
.hero-description {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  max-width: 480px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-portrait-column {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}
.coming-soon-icon {
  width: 72px;
  height: 72px;
  background: rgba(21, 101, 192, 0.12);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coming-soon-label {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
}
.coming-soon-status {
  font-size: 13px;
  color: #526276;
  margin: 0;
}
.connect-label--center {
  justify-content: center;
}
.connect-btn-icon--linkedin {
  background: #0077b5;
}
.connect-btn-icon--facebook {
  background: #1877f2;
}
.connect-btn-icon--paypal {
  background: #0070ba;
}
.connect-btn-icon--instapay {
  background: #00a89d;
}

/* Connect: support links as a secondary group */
.connect-support-label {
  margin: 0 0 14px;
  color: var(--color-muted-on-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.connect-grid--support {
  margin-bottom: 0;
}

/* Small and very large screens */
@media (max-width: 600px) {
  #mgeid-hero .hero-container {
    padding: 48px 20px;
  }
  .hero-grid {
    gap: 40px;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    flex: 1 1 100%;
    justify-content: center;
  }
  .stats-row {
    gap: 16px;
  }
}
@media (min-width: 1600px) {
  #mgeid-hero .hero-container,
  #mgeid-what .what-container,
  #mgeid-books .books-container {
    max-width: 1320px;
  }
}

/* Books: primary download + mirror links */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--color-action);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.18s ease;
}
.btn-download:hover {
  background: var(--color-action-hover);
}
.book-mirrors-label {
  margin: 12px 0 0;
  color: #475569;
  font-size: 0.78rem;
  text-align: center;
}
.book-mirrors {
  display: flex;
  gap: 8px;
}
.btn-mirror {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--color-action);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 0 0 1.5px var(--color-action);
  transition: background 0.18s ease;
}
.btn-mirror:hover {
  background: #eff6ff;
}
html[dir="rtl"] .connect-btn-arrow {
  transform: scaleX(-1);
}
