/* ===== Iraqi Renewable Energy Association — Design System ===== */
:root {
  --navy-950: #061225;
  --navy-900: #0a1c38;
  --navy-800: #0f2a4a;
  --navy-700: #163a63;
  --navy-600: #1f4d80;
  --gold-500: #b9860b;
  --gold-400: #c99a1f;
  --gold-300: #d9b34f;
  --gold-050: #fbf5e6;
  --flag-red: #ce1126;
  --sand: #f6f5f1;
  --white: #ffffff;
  --ink: #16233a;
  --muted: #5b6b80;
  --border: #dde2ea;
  --success: #2fae64;
  --danger: #c53a32;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 4px 18px -8px rgba(10, 28, 56, 0.16);
  --shadow-strong: 0 10px 32px -12px rgba(10, 28, 56, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
  background: var(--sand);
  color: var(--ink);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.8;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Flag accent strip ===== */
.flag-strip { height: 4px; display: flex; }
.flag-strip span { flex: 1; }
.flag-strip span:nth-child(1) { background: var(--flag-red); }
.flag-strip span:nth-child(2) { background: var(--white); border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.flag-strip span:nth-child(3) { background: #111; }

/* ===== Top utility bar ===== */
.topbar {
  background: var(--navy-950);
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px; }
.topbar-links { display: flex; gap: 20px; }
.topbar-links span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-en { letter-spacing: 0.3px; opacity: 0.8; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s var(--ease);
}
.navbar.scrolled { box-shadow: var(--shadow-soft); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; }
.brand-text { color: var(--navy-900); font-weight: 800; font-size: 1.02rem; letter-spacing: 0.1px; }
.brand-text small { display: block; font-weight: 500; font-size: 0.68rem; color: var(--muted); margin-top: 2px; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.92rem;
  position: relative;
  padding: 8px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 2px;
  background: var(--gold-500);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: none; color: var(--navy-900); font-size: 1.6rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--navy-950);
  background-image:
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 26px);
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; padding: 76px 24px 64px; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,154,31,0.4);
  color: var(--gold-300);
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 26px;
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-400); }

.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  color: var(--white);
  font-weight: 800;
  line-height: 1.45;
  margin: 0 auto 22px;
  max-width: 820px;
}
.hero h1 span { color: var(--gold-300); }
.hero-divider {
  width: 70px; height: 3px; background: var(--gold-500);
  margin: 0 auto 24px; border-radius: 2px;
}
.hero p {
  color: rgba(255,255,255,0.78);
  font-size: 1.08rem;
  max-width: 680px;
  margin: 0 auto 38px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-primary {
  background: var(--gold-500);
  color: var(--white);
}
.btn-primary:hover { background: #a67809; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.7); }
.btn-outline-navy { background: transparent; color: var(--navy-900); border-color: var(--border); }
.btn-outline-navy:hover { background: var(--sand); border-color: var(--navy-900); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 56px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 36px;
}
.hero-stat {
  text-align: center;
  padding: 0 clamp(28px, 6vw, 64px);
  border-left: 1px solid rgba(255,255,255,0.12);
}
.hero-stat:last-child { border-left: none; }
.hero-stat b { display: block; font-size: 2rem; color: var(--gold-300); font-weight: 800; }
.hero-stat span { color: rgba(255,255,255,0.65); font-size: 0.88rem; }

/* ===== Section basics ===== */
section { padding: 90px 0; position: relative; }
.section-tag {
  display: inline-block;
  color: var(--gold-500);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gold-500);
  padding-bottom: 4px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--navy-900);
  margin: 0 0 16px;
}
.section-desc { color: var(--muted); font-size: 1rem; max-width: 680px; }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .section-desc { margin-left: auto; margin-right: auto; }

/* ===== About ===== */
.about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.about-visual {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--sand);
  padding: 40px;
  display: flex; align-items: center; justify-content: center;
}
.about-visual img { width: 78%; }
.about-text p { color: var(--muted); font-size: 1rem; margin-bottom: 18px; white-space: pre-line; }

.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.vm-card {
  border: 1px solid var(--border);
  border-right: 3px solid var(--gold-500);
  border-radius: var(--radius-sm);
  background: var(--sand);
  padding: 22px 24px;
}
.vm-card h3 { margin: 0 0 10px; font-size: 1rem; color: var(--navy-900); font-weight: 800; }
.vm-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ===== Goals ===== */
.goals { background: var(--sand); }
.goals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.goal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.25s var(--ease);
}
.goal-card:hover { border-color: var(--gold-500); }
.goal-index {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-900);
  color: var(--gold-300);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.goal-card p { margin: 0; font-weight: 600; color: var(--navy-900); font-size: 0.95rem; }

/* ===== Search ===== */
.search-section {
  background: var(--navy-950);
  color: var(--white);
}
.search-section .section-title { color: var(--white); }
.search-section .section-desc { color: rgba(255,255,255,0.7); }

.search-box {
  max-width: 640px;
  margin: 0 auto 36px;
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px;
  border-radius: var(--radius-sm);
}
.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 0.95rem;
  padding: 12px 18px;
  font-family: inherit;
}
.search-box input::placeholder { color: rgba(255,255,255,0.45); }
.search-box button {
  background: var(--gold-500);
  color: var(--white);
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  transition: background 0.25s var(--ease);
}
.search-box button:hover { background: #a67809; }

.search-results { max-width: 780px; margin: 0 auto; min-height: 40px; }
.result-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.result-avatar {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--white); font-size: 1.1rem;
  flex-shrink: 0;
}
.result-body { flex: 1; }
.result-name { font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.result-meta span { font-size: 0.83rem; color: rgba(255,255,255,0.6); }
.result-meta b { color: var(--gold-300); font-weight: 700; }

.search-state {
  text-align: center;
  color: rgba(255,255,255,0.5);
  padding: 28px 0;
  font-size: 0.92rem;
}
.search-loading {
  display: inline-block; width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Contact ===== */
.contact { background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 46px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--sand);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
}
.info-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--navy-900); color: var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.05rem;
}
.info-card b { display: block; color: var(--navy-900); font-size: 0.93rem; }
.info-card span { color: var(--muted); font-size: 0.87rem; }

.contact-form {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px;
  display: grid;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { position: relative; }
.field label {
  display: block; margin-bottom: 7px; font-weight: 700; font-size: 0.88rem; color: var(--navy-900);
}
.field input, .field textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-family: inherit;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--gold-500); }
.submit-btn {
  justify-self: start;
  background: var(--navy-900);
  color: var(--white);
  padding: 14px 38px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none;
  display: flex; align-items: center; gap: 10px;
  transition: background 0.25s var(--ease);
}
.submit-btn:hover { background: var(--navy-800); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.form-msg { padding: 13px 18px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.88rem; display: none; }
.form-msg.show { display: block; }
.form-msg.success { background: rgba(47,174,100,0.1); color: #1c7a45; border: 1px solid rgba(47,174,100,0.3); }
.form-msg.error { background: rgba(197,58,50,0.08); color: var(--danger); border: 1px solid rgba(197,58,50,0.25); }

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.7);
  padding-top: 64px;
  border-top: 3px solid var(--gold-500);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 42px; height: 42px; }
.footer-brand b { color: var(--white); font-size: 1rem; }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin: 0 0 18px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--gold-400); }

.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 0.82rem;
  transition: background 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
}
.social-row a:hover { background: var(--gold-500); }

.footer-bottom {
  padding: 22px 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 320px; margin: 0 auto; }
  .vm-grid { grid-template-columns: 1fr; }
  .goals-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .topbar { display: none; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
    background: var(--navy-950); flex-direction: column; justify-content: center; gap: 30px;
    transform: translateX(100%); transition: transform 0.4s var(--ease); z-index: 200; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { color: var(--white); }
  .nav-toggle { display: block; }
  .goals-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 8px; }
  .hero-stat { border-left: none; padding: 0 18px; }
  section { padding: 64px 0; }
}
