:root {
  --navy: #0A2342;
  --navy-light: #122d54;
  --gold: #C9A84C;
  --gold-light: #e8c56a;
  --white: #ffffff;
  --off-white: #F8F9FA;
  --light-gray: #F0F2F5;
  --text-dark: #1a1a2e;
  --text-mid: #555;
  --text-light: #888;
  --gradient-dark: linear-gradient(135deg, #0A2342 0%, #1a3a6b 50%, #0d2d50 100%);
  --gradient-gold: linear-gradient(135deg, #C9A84C, #e8c56a, #C9A84C);
  --shadow: 0 20px 60px rgba(10, 35, 66, 0.15);
  --shadow-sm: 0 4px 20px rgba(10, 35, 66, 0.1);
  --border-gold: rgba(201, 168, 76, 0.22);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--white);
  color: var(--text-dark);
  direction: rtl;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

.page-shell {
  overflow-x: hidden;
  max-width: 100%;
}

/* =========================
   NAVBAR
========================= */
.academy-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  background: rgba(10, 35, 66, 0.95);
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
}

.nav-inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: 84px;
  margin: 0 auto;
  padding: 18px 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* logo fixed to the right */
.nav-logo {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.nav-logo span,
.footer-logo span {
  color: var(--white);
}

/* links always centered */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--gold);
}

/* profile fixed to the left */
.nav-actions {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-toggle-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.profile-toggle-btn .profile-icon,
.profile-icon {
  font-size: 18px;
  line-height: 1;
  color: #ffffff;
}

.profile-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(10, 35, 66, 0.98);
  border: 1px solid rgba(201, 168, 76, 0.2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  z-index: 3000;
}

.profile-dropdown-menu.show {
  display: block;
}

.profile-dropdown-menu[hidden] {
  display: none !important;
}

.profile-menu-btn {
  width: 100%;
  display: block;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  cursor: pointer;
}

.profile-menu-btn:last-child {
  margin-bottom: 0;
}

.profile-menu-btn-primary {
  background: linear-gradient(135deg, #C9A84C, #e8c56a, #C9A84C);
  color: #0A2342;
}

.nav-btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease;
  will-change: transform;
}

.nav-btn:hover,
.btn:hover,
.submit-btn:hover,
.footer-link-btn:hover {
  transform: translateY(-2px);
}

.nav-btn-primary,
.btn-primary,
.submit-btn {
  background: var(--gradient-gold);
  color: var(--navy);
  box-shadow: 0 10px 26px rgba(201, 168, 76, 0.26);
}

.nav-btn-secondary,
.btn-secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

/* =========================
   HERO
========================= */
.academy-hero {
  position: relative;
  min-height: 100vh;
  background: var(--gradient-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(201, 168, 76, 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05), transparent 30%);
}

.stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  opacity: 0.45;
  animation: twinkle 2.4s infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.25;
    transform: scale(1);
  }
  to {
    opacity: 0.8;
    transform: scale(1.25);
  }
}

.plane-mark {
  position: absolute;
  color: rgba(255, 255, 255, 0.08);
  font-size: 3rem;
  pointer-events: none;
}

.plane-one {
  top: 20%;
  left: 12%;
  transform: rotate(-12deg);
}

.plane-two {
  bottom: 18%;
  right: 10%;
  transform: rotate(16deg);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 130px 28px 90px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 42px;
  align-items: center;
}

.hero-badge,
.card-label,
.modal-badge,
.admin-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 18px;
  border: 1px solid rgba(201, 168, 76, 0.26);
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-text h1 {
  margin-top: 22px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.2;
  color: var(--white);
  font-weight: 900;
}

.hero-text h1 span {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.07rem;
  line-height: 1.95;
  max-width: 640px;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease;
  will-change: transform;
}

.hero-stats {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card,
.glass-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.stat-card {
  padding: 20px;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.main-card {
  padding: 30px;
}

.main-card h2 {
  margin-top: 18px;
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 800;
}

.preview-list {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.preview-list li {
  position: relative;
  padding-right: 24px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.96rem;
  line-height: 1.8;
}

.preview-list li::before,
.admin-preview-card li::before {
  content: '✈';
  position: absolute;
  right: 0;
  color: var(--gold);
  font-size: 0.9rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mini-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-icon,
.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: var(--gold);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.mini-card h3 {
  color: var(--white);
  font-size: 0.98rem;
  font-weight: 700;
}

.mini-card p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  margin-top: 4px;
  line-height: 1.6;
}

/* =========================
   SECTIONS
========================= */
.section {
  padding: 96px 28px;
}

.section-light {
  background: var(--off-white);
}

.section-dark {
  background: var(--gradient-dark);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-tag::before,
.section-tag::after {
  content: '';
  width: 42px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

.section-tag.alt {
  color: var(--gold-light);
}

.section-title {
  text-align: center;
  color: var(--navy);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 900;
  margin-bottom: 16px;
}

.section-title.light {
  color: var(--white);
}

.section-subtitle {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.9;
}

.section-subtitle.light {
  color: rgba(255, 255, 255, 0.72);
}

.features-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card,
.step-card,
.faq-item,
.admin-preview-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 35, 66, 0.08);
}

.feature-card {
  padding: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.feature-card:hover,
.step-card:hover,
.admin-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin-top: 18px;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 800;
}

.feature-card p {
  margin-top: 12px;
  color: var(--text-mid);
  font-size: 0.93rem;
  line-height: 1.8;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step-card {
  padding: 34px 26px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-dark);
  border: 3px solid var(--gold);
  color: var(--gold);
  font-size: 1.6rem;
  font-weight: 900;
}

.step-card h3 {
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.step-card p {
  color: var(--text-mid);
  font-size: 0.92rem;
  line-height: 1.8;
}

.benefits-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.benefits-list-wrap {
  display: grid;
  gap: 18px;
}

.benefit-item {
  display: flex;
  gap: 14px;
  background: var(--white);
  padding: 24px;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 35, 66, 0.08);
}

.benefit-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-gold);
  color: var(--navy);
  font-weight: 900;
}

.benefit-item h3 {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.benefit-item p {
  color: var(--text-mid);
  font-size: 0.92rem;
  line-height: 1.8;
}

.admin-preview-card {
  padding: 30px;
  background: var(--gradient-dark);
  color: var(--white);
  border: 1px solid var(--border-gold);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-preview-card h3 {
  margin-top: 18px;
  font-size: 1.35rem;
  font-weight: 800;
}

.admin-preview-card ul {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.admin-preview-card li {
  position: relative;
  padding-right: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  line-height: 1.8;
}

.faq-grid {
  grid-template-columns: 1fr 1fr;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px;
  text-align: right;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 800;
}

.faq-arrow {
  color: var(--gold);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 24px 24px;
  color: var(--text-mid);
  font-size: 0.92rem;
  line-height: 1.9;
}

.faq-item.open .faq-answer {
  display: block;
}

/* =========================
   FOOTER
========================= */
.academy-footer {
  background: #060e1a;
  padding: 48px 28px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 12px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
  line-height: 1.8;
  max-width: 580px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a,
.footer-link-btn {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.16s ease;
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--gold);
}

/* =========================
   MODAL
========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(3, 10, 22, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 0.16s ease, opacity 0.16s ease;
  will-change: transform, opacity;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--light-gray);
  color: var(--navy);
  font-size: 1.7rem;
  line-height: 1;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
  background: #e8ebef;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(10, 35, 66, 0.08);
}

.modal-tab {
  flex: 1;
  padding: 18px 20px;
  color: var(--text-mid);
  font-weight: 800;
  background: transparent;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.modal-tab.active {
  color: var(--navy);
  background: rgba(201, 168, 76, 0.08);
}

.modal-panels {
  padding: 34px 30px 30px;
}

.modal-panel {
  display: none;
}

.modal-panel.active {
  display: block;
}

.modal-header h2 {
  margin-top: 18px;
  color: var(--navy);
  font-size: 1.7rem;
  font-weight: 900;
}

.modal-header p {
  margin-top: 14px;
  color: var(--text-mid);
  font-size: 0.96rem;
  line-height: 1.9;
}

.auth-form {
  margin-top: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.auth-form label {
  display: block;
}

.auth-form span {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(10, 35, 66, 0.12);
  background: #fff;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
}

.form-note {
  margin-top: 4px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(201, 168, 76, 0.08);
  color: var(--text-mid);
  font-size: 0.88rem;
  line-height: 1.8;
}

.submit-btn {
  width: 100%;
  padding: 16px 22px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 800;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

/* =========================
   AUTH PAGE
========================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-dark);
  padding: 40px 20px;
}

.auth-container {
  width: 100%;
  max-width: 720px;
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
  .hero-content,
  .benefits-layout {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .features-grid,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   FINAL MOBILE NAV FIX
   put this at the VERY END
========================= */

@media (max-width: 900px) {
  .nav-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: calc(env(safe-area-inset-top) + 10px) 12px 10px;

    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
  }

  .nav-links {
    display: none !important;
  }

  .nav-actions {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
  }

  .nav-logo {
    grid-column: 2;
    justify-self: end;
    min-width: 0;
    margin: 0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 1rem;
  }

  .profile-toggle-btn {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
  }

  .profile-icon {
    color: #fff;
    font-size: 22px;
    line-height: 1;
    transition: color 0.3s ease;
  }

  .profile-toggle-btn:hover .profile-icon {
    color: #aaa;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    padding: calc(env(safe-area-inset-top) + 8px) 10px 8px;
    gap: 8px;
  }

  .nav-logo {
    font-size: 0.92rem;
  }

  .profile-icon {
    font-size: 20px;
  }
}

@media (max-width: 390px) {
  .nav-logo {
    font-size: 0.84rem;
  }

  .profile-icon {
    font-size: 18px;
  }
}


