/* ═══════════════════════════════════════════════
   قالب موقع الشبكات — المؤسسة العربية للعلوم والتكنولوجيا
   ASTF Network Website Template — Stylesheet v2.0
   ═══════════════════════════════════════════════ */

:root {
  /* ════════════════════════════════════════════════════════════
     🎨 ألوان القالب — ألوان المؤسسة العربية للعلوم والتكنولوجيا
     🎨 Template Colors — ASTF Brand Colors + White
     غيّر --primary إلى لون شبكتك عند الاستخدام
     ════════════════════════════════════════════════════════════ */
  --primary: #1a3a5c;        /* أزرق ASTF — اللون الأساسي */
  --primary-dark: #0d1b2a;   /* كحلي ASTF داكن */
  --primary-light: #2c5f8a;  /* أزرق ASTF فاتح */
  --secondary: #142d4c;      /* أزرق ثانوي */
  --accent: #D4AF37;         /* ذهبي ASTF */
  --accent-light: #e0c555;
  --navy: #0d1b2a;           /* كحلي ASTF */
  --dark: #0d1b2a;
  --text: #2a2a2a;
  --text-light: #6b6b6b;
  --bg: #ffffff;             /* أبيض */
  --bg-alt: #f5f7fa;         /* أبيض مائل للرمادي */
  --bg-dark: #0d1b2a;
  --border: #dde3ec;
  --gradient-green: linear-gradient(135deg, #1a3a5c 0%, #0d1b2a 50%, #142d4c 100%);
  --gradient-hero: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 60%, #142d4c 100%);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Cairo', 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.4; color: var(--dark); }
h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-light { color: var(--text-light); }
.subtitle { font-size: 1.1rem; color: var(--text-light); max-width: 700px; margin: 0 auto 2rem; }

/* ── Navigation ── */
.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.navbar__logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.navbar__logo img { height: 42px; }
.navbar__logo span { font-weight: 700; font-size: 1.1rem; color: var(--primary-dark); }
.navbar__links { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.navbar__links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.navbar__links a:hover, .navbar__links a.active { color: var(--primary); }
.navbar__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.navbar__cta {
  background: var(--primary);
  color: white !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.navbar__cta:hover { background: var(--primary-dark); }

.navbar__astf {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--accent);
  color: var(--accent) !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.navbar__astf:hover {
  background: var(--accent);
  color: var(--dark) !important;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-right: 0.5rem;
}
.lang-toggle a {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-light);
  transition: var(--transition);
}
.lang-toggle a.lang-active {
  background: var(--primary);
  color: white;
}
.lang-toggle a:not(.lang-active):hover {
  background: var(--bg-alt);
}

.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ── Hero Section ── */
/* ═══ Subtle Background Animations ═══ */
@keyframes slowDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}
@keyframes slowDrift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 15px); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero {
  background: linear-gradient(-45deg, #0d1b2a, #1a3a5c, #142d4c, #0d1b2a);
  background-size: 300% 300%;
  animation: gradientShift 20s ease infinite;
  color: white;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212,175,55,0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: slowDrift 15s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26,58,92,0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: slowDrift2 18s ease-in-out infinite;
}
.hero .container { position: relative; }
.hero__content { position: relative; z-index: 1; max-width: 700px; }

/* Large decorative logo sitting in the empty space of the hero */
.hero__visual {
  position: absolute;
  top: 50%;
  inset-inline-end: 1rem;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.hero__visual-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      #ffffff 0%,
      #ffffff 58%,
      rgba(255,255,255,0.85) 64%,
      rgba(255,255,255,0) 72%);
  box-shadow:
    0 25px 60px rgba(0,0,0,0.45),
    0 0 0 1px rgba(212,175,55,0.35);
}
.hero__visual-logo {
  position: relative;
  width: 260px;
  height: 260px;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,0.25));
}
.hero__visual-text {
  position: relative;
  margin-top: 1rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: 1.1rem;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

@media (max-width: 992px) {
  .hero__visual {
    width: 220px;
    height: 220px;
    opacity: 0.5;
  }
  .hero__visual-logo { width: 150px; height: 150px; }
  .hero__visual-text { font-size: 0.9rem; }
}
@media (max-width: 768px) {
  .hero__visual { display: none; }
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.hero h1 { color: white; font-size: 3rem; margin-bottom: 1.2rem; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.15rem; line-height: 1.8; max-width: 600px; }
.hero__tagline { color: var(--accent-light) !important; font-weight: 600; font-style: italic; font-size: 1.1rem !important; margin-top: 0.5rem; }
.hero__actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
}
.btn-primary { background: var(--accent); color: var(--dark); border-color: var(--accent); }
.btn-primary:hover { background: #b8901f; transform: translateY(-1px); }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }
.btn-green { background: var(--primary); color: white; }
.btn-green:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-white { background: white; color: var(--primary-dark); }
.btn-white:hover { background: #f0f0f0; }

/* ── Sections ── */
.section { padding: 5rem 0; }
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: linear-gradient(-45deg, #0d1b2a, #142d4c, #0d1b2a, #1a3a5c);
  background-size: 300% 300%;
  animation: gradientShift 25s ease infinite;
  color: white;
  position: relative;
  overflow: hidden;
}
.section--dark h2, .section--dark h3 { color: white; }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header h2 { position: relative; display: inline-block; }
.section__header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0.8rem auto 0;
  border-radius: 3px;
}

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__icon {
  width: 56px;
  height: 56px;
  background: var(--gradient-green);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
  color: white;
}
.card h3 { color: var(--primary-dark); }

/* ── Stats ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; text-align: center; }
.stat__number { font-size: 2.5rem; font-weight: 800; color: var(--accent); }
.stat__label { font-size: 0.95rem; color: var(--text-light); margin-top: 0.3rem; }
.section--dark .stat__label { color: rgba(255,255,255,0.7); }

/* ── Values Grid ── */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.value-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-sm);
  border-right: 4px solid var(--primary);
  border-left: none;
  box-shadow: var(--shadow);
}
.value-item__icon { font-size: 1.5rem; flex-shrink: 0; }
.value-item h4 { color: var(--primary-dark); margin-bottom: 0.3rem; }
.value-item p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* ── Team ── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.team-card { text-align: center; }
.team-card__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid var(--primary);
  background: #eee;
}
.team-card__placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  border: 4px solid var(--accent);
}
.team-card h3 { font-size: 1.1rem; color: var(--primary-dark); margin-bottom: 0.25rem; }
.team-card__role { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.team-card__bio { font-size: 0.88rem; color: var(--text-light); margin-top: 0.5rem; line-height: 1.7; }

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(-45deg, #1a3a5c, #0d1b2a, #142d4c, #1a3a5c);
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
  color: white;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
  text-align: center;
}
.cta-section h2 { color: white; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 2rem; }

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer h4 { color: white; margin-bottom: 1rem; font-size: 1rem; }
.footer__brand p { font-size: 0.9rem; line-height: 1.7; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 0.5rem; }
.footer__links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.footer__links a:hover { color: var(--accent-light); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__astf { display: flex; align-items: center; gap: 0.5rem; }
.footer__astf img { height: 28px; opacity: 0.7; }
.footer__dev {
  text-align: center;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info__item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact-info__icon {
  width: 44px;
  height: 44px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--primary);
}
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Cairo', 'Inter', sans-serif;
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,104,71,0.1);
}

/* ── SDG Section ── */
.sdg-grid { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.sdg-badge {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
}

/* ── Template Placeholder Style ── */
.template-placeholder {
  color: #999;
  background: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 1rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border);
    align-items: stretch;
  }
  .navbar__links.navbar__links--open { display: flex; }
  .navbar__links li { width: 100%; }
  .navbar__links > li > a:not(.navbar__cta):not(.navbar__astf) {
    display: block;
    padding: 0.6rem 0;
  }
  .navbar__cta, .navbar__astf { width: 100%; justify-content: center; text-align: center; }
  .lang-toggle { justify-content: center; margin: 0; }
  .menu-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .lang-toggle { margin-right: 0; }
}

/* ── LTR overrides for English mode ── */
[dir="ltr"] [style*="text-align: right"],
[dir="ltr"] [style*="text-align:right"] {
  text-align: left !important;
}
