/* Global */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  /* US embassy–like palette */
  --primary-color: #00b2ff; /* deep blue */
  --accent-color: #006d9c;  /* flag red */
  --text-color: #202122;
  --muted-text: #54595d;
  --bg: #ffffff;  /* خلفية الموقع بيضاء بالكامل */
  --white: #ffffff;
  --border: #d0d4dc;
}

/* لا يوجد وضع ليلي الآن، نعتمد فقط على القيم الافتراضية في :root */
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text-color);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  /* Footer not fixed: no reserved space needed */
  padding-bottom: 0;
  display: flex;            /* sticky footer layout */
  flex-direction: column;   /* stack header, main, footer */
  min-height: 100vh;        /* push footer to bottom when content is short */
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header (US-embassy-like blue bar, simple content) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary-color);
  border-bottom: 3px solid var(--accent-color);
}
.navbar .container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f9fafb;
}
.logo img { height: 34px; width: auto; }
.logo span {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}
.nav-links {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover {
  text-decoration: underline;
}
.btn-login {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-login:hover {
  background: #e5f3ff;
}
.theme-toggle {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.3);
  background: rgba(15, 23, 42, 0.35);
  color: #f9fafb;
  padding: 4px 10px;
  font-weight: 500;
  font-size: 0.9rem;
}
.theme-toggle:hover {
  background: rgba(15, 23, 42, 0.6);
}
.lang-select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: var(--primary-color);
  font-size: 0.85rem;
}
.contact-link {
  color: var(--accent-color);
  font-weight: 600;
}

/* Content */
.main-content { padding: 24px 0 40px; flex: 1; }
.content .lead { background: var(--white); border: 1px solid var(--border); padding: 18px 16px; border-radius: 4px; box-shadow: 0 2px 4px rgba(15,23,42,0.04); }
.content h1 { font-size: 1.8rem; margin-bottom: 8px; }
.content p { color: var(--muted-text); }
.lead-text { margin-top: 8px; font-size: 0.98rem; }
.lead-text + .lead-text { margin-top: 4px; }
.news-ticker { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 6px; overflow: hidden; white-space: nowrap; }
.news-track { display: inline-block; animation: ticker 25s linear infinite; }
.news-track span { display: inline-block; padding-inline-end: 40px; color: var(--muted-text); font-size: 0.95rem; }
@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.section { margin-top: 22px; background: var(--white); border: 1px solid var(--border); padding: 18px 16px; border-radius: 4px; box-shadow: 0 2px 4px rgba(15,23,42,0.03); }
.section h2 { font-size: 1.4rem; margin-bottom: 10px; }
.section ul { padding-right: 18px; }
.section li { margin: 6px 0; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; cursor: pointer; outline: none; }
.card a { display: block; text-decoration: none; color: inherit; }
.card a:hover { text-decoration: none; }
.card img { display: block; width: 100%; height: 180px; object-fit: cover; background: #e5e5e5; }
.card figcaption { padding: 10px; font-weight: 600; text-align: center; }
.card:focus { box-shadow: 0 0 0 3px rgba(51,102,204,0.3); }

.platform-cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.platform-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  padding: 16px 14px 18px;
  box-shadow: 0 2px 4px rgba(15,23,42,0.04);
  text-align: center;
}
.platform-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.platform-card p {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-bottom: 12px;
}

.platform-actions {
  margin-top: 14px;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.platform-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--primary-color); /* إطار برتقالي/أزرق حسب المتغير */
  background: var(--white);               /* خلفية بيضاء */
  color: var(--primary-color);            /* نص بلون الإطار */
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.platform-btn:hover {
  background: var(--primary-color); /* يمتلئ باللون عند hover */
  border-color: var(--primary-color);
  color: #ffffff;
}

/* SMIRQ OTP page button */
.smirq-cta { margin-top: 16px; }
.smirq-cta .action-btn { display: inline-block; text-align: center; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 2000; }
.modal.open { display: flex; }
.modal-dialog { background: var(--white); max-width: 720px; width: 92%; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.modal-title { font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--muted-text); }
.modal-body { padding: 0; }
.modal-body img { width: 100%; height: auto; display: block; }
.modal-desc { padding: 12px; color: var(--muted-text); }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.action-btn { display: inline-block; padding: 8px 12px; border-radius: 6px; text-decoration: none; font-weight: 700; border: 1px solid var(--border); }
.action-btn.whatsapp { background: #25D366; color: #fff; border-color: #1da851; }
.action-btn.email { background: var(--white); color: var(--text-color); }

/* Footer (static at page end) */
.footer {
  position: static;
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 12px 0;
}
.copyright { text-align: center; color: var(--muted-text); }
.footer-contact { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 6px; color: var(--muted-text); }
.footer-contact .fc-item { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--white); color: var(--text-color); text-decoration: none; }
.footer-contact .fc-item:hover { background: var(--bg); }
.footer-contact .fc-item .fa-whatsapp { color: #1da851; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Responsive */
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .navbar .container { flex-wrap: wrap; }
  .nav-links { width: 100%; justify-content: center; order: 2; padding-bottom: 8px; }
  .logo { order: 1; width: 100%; justify-content: center; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* Floating chat button */
.chat-fab {
  position: fixed;
  bottom: 88px; /* above fixed footer */
  inset-inline-start: 16px; /* start side for RTL/LTR */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #00b2ff; /* WhatsApp green */
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  border: none;
  text-decoration: none;
  z-index: 120; /* above footer (90) and near modal (2000) */
  transition: transform .15s ease, filter .15s ease;
}
.chat-fab:hover { transform: translateY(-2px); filter: brightness(1.05); }
.chat-fab i { font-size: 1.6rem; line-height: 1; }

@media (max-width: 560px) {
  .chat-fab { bottom: 92px; width: 52px; height: 52px; }
}

/* Chat panel */
.chat-panel {
  position: fixed;
  bottom: 160px; /* keep clear of footer and FAB */
  inset-inline-start: 16px;
  width: 320px;
  max-width: 92vw;
  background: var(--white);
  color: var(--text-color);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 140; /* above FAB */
}
.chat-panel.open { display: flex; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg); }
.chat-title { font-weight: 700; }
.chat-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted-text); }
.chat-body { padding: 10px; height: 340px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: var(--white); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--bg); }
.chat-input { flex: 1; padding: 10px 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--white); color: var(--text-color); }
.chat-send { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--text-color); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-send:hover { filter: brightness(0.98); }

/* Message bubbles */
.msg { max-width: 85%; padding: 8px 10px; border-radius: 12px; font-size: 0.95rem; line-height: 1.4; word-wrap: break-word; }
.msg.agent { align-self: flex-start; background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }
.msg.user { align-self: flex-end; background: #25D366; color: #fff; }

@media (max-width: 560px) {
  .chat-panel { bottom: 168px; width: calc(100vw - 32px); }
  .chat-body { height: 300px; }
}
