/* ============================================================
   Arabic Nav — Global Header Styles
   Loaded on every page to support the shared arabic-nav partial.
   ============================================================ */

/* Design tokens */
:root {
  --primary:      #183FE1;
  --primary-dk:   #0F2BA8;
  --primary-xdk:  #081240;
  --primary-lt:   #EEF1FF;
  --dark:         #0A0F1E;
  --dark-2:       #1a1a2e;
  --border:       rgba(0,0,0,0.08);
  --white:        #ffffff;
  --gold:         #F5A623;
  --gold-dk:      #D48C1A;
  --font:         'Cairo', 'Tajawal', Arial, sans-serif;
  --shadow-sm:    0 2px 16px rgba(24,63,225,0.07);
  --radius-sm:    8px;
  --radius-md:    14px;
}

/* Scoped resets — only affects nav context */
.ah-nav a,
.ah-mobile-nav a {
  text-decoration: none;
  color: inherit;
}

.ah-logo img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   CONTAINER (shared utility used inside the nav)
   ============================================================ */
.ah-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
.ah-bar {
  background: var(--primary-xdk);
  color: rgba(255,255,255,0.92);
  text-align: center;
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: var(--font);
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.ah-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  animation: ah-bar-shine 4s linear infinite;
  pointer-events: none;
}

@keyframes ah-bar-shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.ah-bar strong { color: var(--gold); font-weight: 800; }

.ah-bar-code {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  border-radius: 5px;
  padding: 2px 12px;
  margin: 0 6px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.ah-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
  font-family: var(--font);
  direction: rtl;
}

.ah-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 20px;
}

.ah-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ah-logo img {
  height: 44px;
  width: auto;
}

.ah-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ah-nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark-2);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
  white-space: nowrap;
  font-family: var(--font);
}

.ah-nav-links a:hover,
.ah-nav-links a.active {
  color: var(--primary);
  background: var(--primary-lt);
}

.ah-nav-links a.active {
  font-weight: 700;
}

.ah-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ============================================================
   DASHBOARD BUTTON
   ============================================================ */
.ah-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .25s;
  white-space: nowrap;
  text-align: center;
  justify-content: center;
  text-decoration: none;
}

.ah-btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(24,63,225,0.30);
}

.ah-btn-primary:hover {
  background: var(--primary-dk);
  box-shadow: 0 8px 28px rgba(24,63,225,0.40);
  transform: translateY(-2px);
  color: var(--white);
}

/* ============================================================
   HAMBURGER
   ============================================================ */
.ah-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.ah-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark-2);
  border-radius: 2px;
  transition: all .3s;
}

/* ============================================================
   MOBILE NAV OVERLAY
   ============================================================ */
.ah-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 9999;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  direction: rtl;
  font-family: var(--font);
}

.ah-mobile-nav.open { display: flex; }

.ah-mobile-close {
  align-self: flex-start;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--dark-2);
  margin-bottom: 24px;
  background: none;
  border: none;
  line-height: 1;
}

.ah-mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.ah-mobile-nav ul a {
  display: block;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark-2);
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
}

.ah-mobile-nav ul a:hover {
  background: var(--primary-lt);
  color: var(--primary);
}

/* ============================================================
   RESPONSIVE (nav)
   ============================================================ */
@media (max-width: 768px) {
  .ah-nav-links              { display: none; }
  .ah-hamburger              { display: flex; }
  .ah-nav-actions .ah-btn    { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.ah-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.72);
  padding: 64px 0 32px;
  font-family: var(--font);
  direction: rtl;
}

.ah-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 52px;
}

.ah-footer-logo {
  height: 42px;
  width: auto;
  margin-bottom: 18px;
  filter: brightness(10);
  opacity: 0.88;
}

.ah-footer-brand p {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
}

.ah-footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.ah-social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  transition: all .2s;
}

.ah-social-link:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.ah-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ah-footer-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ah-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.ah-footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.52);
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.ah-footer-col ul a:hover { color: var(--white); }

.ah-footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ah-footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.32);
  margin: 0;
}

.ah-footer-flags {
  display: flex;
  gap: 8px;
  font-size: 1.4rem;
}

@media (max-width: 1024px) {
  .ah-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .ah-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .ah-footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ODS Global Footer (ods-footer)
   ============================================================ */
.ods-footer {
  background-color: #101223;
  color: #ffffff;
  font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
  direction: rtl;
  padding-top: 60px;
  width: 100%;
}

.ods-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  align-items: start;
}

/* Brand column */
.ods-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.ods-instructor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.ods-flag {
  font-size: 26px;
  line-height: 1;
}

.ods-instructor-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid rgba(255,255,255,0.15);
}

.ods-brand-badge {
  background: rgba(24, 63, 225, 0.4);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.25);
  white-space: nowrap;
}

.ods-social-label {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  margin: 4px 0 0;
  line-height: 1.4;
}

.ods-social-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.ods-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.ods-social-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.8);
}

.ods-social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Nav columns */
.ods-footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ods-footer-heading {
  font-size: 15px;
  font-weight: 700;
  color: #E08C0E;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  width: 100%;
  text-align: right;
}

.ods-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: right;
}

.ods-footer-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  display: block;
}

.ods-footer-links a:hover { color: #E08C0E; }

/* Copyright bar */
.ods-footer-copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
  padding: 14px 24px;
  text-align: center;
  direction: ltr;
}

.ods-footer-copyright p {
  margin: 0;
  font-size: 13px;
  font-family: 'Cairo', Arial, sans-serif;
}

.ods-copy-brand {
  color: #E08C0E;
  font-weight: 700;
}

.ods-copy-text {
  color: #ffffff;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
  .ods-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .ods-footer-brand {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 540px) {
  .ods-footer-inner {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
  }
  .ods-footer-brand {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
