@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #045283;
  --primary-2: #0570b0;
  --primary-3: #0a8acb;
  --accent: #f4b41a;
  --dark: #020915;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--dark);
  color: #fff;
}

/* ── Squares Background ── */
.squares-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

/* ── Background ── */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at top, rgba(4,82,131,0.55) 0, transparent 55%),
              radial-gradient(circle at bottom, rgba(4,82,131,0.75) 0, var(--dark) 60%);
  background-size: 140% 140%;
  animation: gradientShift 18s ease-in-out infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orbFloat 16s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.orb-1 { width: 480px; height: 480px; background: #045283; top: -160px; left: -120px; }
.orb-2 { width: 380px; height: 380px; background: #0570b0; bottom: -120px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 320px; height: 320px; background: #0a8acb; top: 35%; left: 45%; animation-delay: -9s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(35px, -25px) scale(1.04); }
  66%       { transform: translate(-25px, 25px) scale(0.96); }
}

.grid-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(4,82,131,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4,82,131,0.10) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  pointer-events: none;
}

/* ── Language Toggle ── */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 8px;
}

.lang-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(4,82,131,0.6);
  background: rgba(2,9,21,0.85);
  backdrop-filter: blur(14px);
  color: #e5f2fb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
  font-family: inherit;
}
.lang-btn:hover { background: rgba(4,82,131,0.85); border-color: #0a8acb; transform: translateY(-1px); }
.lang-btn.active { background: linear-gradient(135deg, #045283, #0a8acb); border-color: transparent; box-shadow: 0 0 20px rgba(4,82,131,0.7); color: #fff; }

/* ── Main Content ── */
.main-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: contentFadeIn 0.9s ease-out forwards;
  opacity: 0;
}

@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ── */
.logo-container {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeInDown 0.9s ease-out;
}

.logo-image-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.logo-image {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  object-fit: contain;
  background: radial-gradient(circle, rgba(255,255,255,0.28), transparent 65%);
  padding: 8px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}

.logo-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 999px;
  background: rgba(4,82,131,0.25);
  border: 1px solid rgba(4,82,131,0.6);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #a6d2f5;
  margin-bottom: 16px;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(4,82,131,0.4); }
  50%     { box-shadow: 0 0 25px 6px rgba(4,82,131,0.25); }
}

.logo-title {
  font-size: clamp(50px, 10vw, 100px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #d6e8f7 25%, #53a9df 60%, #ffffff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.logo-subtitle {
  font-size: clamp(14px, 3vw, 18px);
  color: rgba(227,240,250,0.75);
  font-weight: 400;
  letter-spacing: 0.7px;
}

/* ── Buttons Grid ── */
.buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 500px;
  animation: fadeInUp 1s ease 0.25s both;
}

@media (min-width: 768px) {
  .buttons-grid {
    flex-direction: row;
    max-width: 850px;
    gap: 20px;
  }
  .reg-btn { flex: 1; }
}

.reg-btn {
  position: relative;
  overflow: hidden;
  padding: 20px 28px;
  border-radius: 18px;
  border: 1px solid rgba(4,82,131,0.4);
  background: linear-gradient(135deg, rgba(4,82,131,0.3), rgba(10,138,203,0.15));
  backdrop-filter: blur(22px);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-align: center;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.reg-btn:hover {
  transform: translateY(-4px);
  border-color: rgba(10,138,203,0.7);
  box-shadow: 0 20px 50px rgba(4,82,131,0.5);
}

.reg-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-icon {
  font-size: 28px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.reg-btn:hover .btn-icon {
  transform: scale(1.15) rotate(-5deg);
}

.btn-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2,9,21,0.80);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: radial-gradient(circle at top, rgba(13,61,97,0.75), rgba(6,21,40,0.96));
  border: 1px solid rgba(4,82,131,0.7);
  border-radius: 26px;
  padding: 28px 24px 26px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(4,82,131,0.6) transparent;
}
.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, #cfe5f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.25);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  font-family: inherit;
}
.close-btn:hover {
  background: rgba(244,180,26,0.2);
  border-color: var(--accent);
  transform: rotate(90deg);
}

/* ── Form ── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(230,241,250,0.85);
  margin-bottom: 6px;
}
.form-label span:last-child { color: #e86b6b; margin-inline-start: 3px; }

.form-input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(2,10,22,0.8);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.25s ease;
  outline: none;
  appearance: none;
}
.form-input::placeholder { color: rgba(211,227,243,0.45); }
.form-input:focus {
  border-color: var(--primary-3);
  background: rgba(10,138,203,0.05);
  box-shadow: 0 0 0 1px rgba(10,138,203,0.4), 0 0 22px rgba(4,82,131,0.45);
  transform: translateY(-1px);
}
.form-input.error {
  border-color: #e86b6b;
  box-shadow: 0 0 0 3px rgba(232,107,107,0.25);
}
.form-input option { background: #071426; color: #fff; }

textarea.form-input { resize: vertical; min-height: 90px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Submit Button ── */
.submit-btn {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #045283, #0a8acb);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,0.75); }
.submit-btn:active { transform: scale(0.98); }

/* ── Success ── */
.success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 34px 16px 24px;
  gap: 18px;
}
.success-screen.show { display: flex; }

.success-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff, #0a8acb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  animation: successPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 45px rgba(10,138,203,0.8);
}
@keyframes successPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.success-title { font-size: 21px; font-weight: 800; }
.success-msg { font-size: 14px; color: rgba(225,238,250,0.8); line-height: 1.7; }

/* ── Confetti ── */
.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confettiFall 2s ease-in forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(-40px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(260px) rotate(720deg); opacity: 0; }
}

/* ── Animations ── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 20;
  width: 100%;
  padding: 12px 24px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(227,240,250,0.8);
  background: linear-gradient(to top, rgba(2,9,21,0.95), transparent);
}

.footer-left,
.footer-center,
.footer-right {
  display: flex;
  align-items: center;
}

.footer-center {
  text-align: center;
  justify-content: center;
  flex: 1;
}

.footer-brand {
  font-weight: 800;
  color: #f4b41a;
  letter-spacing: 0.08em;
}

/* Social icons */
.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(4,82,131,0.6);
  background: rgba(2,9,21,0.85);
  color: #e5f2fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.7);
}

/* ألوان خاصة بالمنصات */
.social-icon.fb:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.social-icon.ig:hover {
  background: radial-gradient(circle at 30% 30%, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  border-color: #d62976;
}

.social-icon.phone:hover {
  background: #0f9d58;
  border-color: #0f9d58;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-left,
  .footer-center,
  .footer-right {
    justify-content: center;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(4,82,131,0.7); border-radius: 3px; }
