/* J Tech Solutions — shared design system */
:root {
  --brand: #7A2E28;
  --brand-deep: #4F1C18;
  --brand-soft: #F7EDEA;
  --ink: #1C1412;
  --muted: #5C4F4B;
  --line: #E4D5D0;
  --paper: #FBF7F4;
  --sand: #F3E8E2;
  --steel: #2A3A45;
  --steel-soft: #E8EEF2;
  --accent: #C45C3A;
  --white: #FFFFFF;
  --radius: 4px;
  --max: 1120px;
}

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

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

body.ar { direction: rtl; }

h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.form-status {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
}
.form-status.ok {
  background: #E8F5EC;
  color: #1B5E2A;
  border: 1px solid #B7E0C2;
}
.form-status.err {
  background: #FCEDEA;
  color: #7A2E28;
  border: 1px solid #E8C4BE;
}

.form-tile label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.lang-ar { display: none !important; }
html.ar .lang-en,
body.ar .lang-en { display: none !important; }
html.ar .lang-ar,
body.ar .lang-ar { display: revert !important; }
html.ar div.lang-ar,
html.ar section.lang-ar,
html.ar ul.lang-ar,
html.ar p.lang-ar,
html.ar h1.lang-ar,
html.ar h2.lang-ar,
html.ar h3.lang-ar,
html.ar figcaption.lang-ar,
html.ar form.lang-ar,
html.ar label.lang-ar,
body.ar div.lang-ar,
body.ar section.lang-ar,
body.ar ul.lang-ar,
body.ar p.lang-ar,
body.ar h1.lang-ar,
body.ar h2.lang-ar,
body.ar h3.lang-ar,
body.ar figcaption.lang-ar,
body.ar form.lang-ar,
body.ar label.lang-ar { display: block !important; }
html.ar .lang-ar.flex,
html.ar div.lang-ar.two-cols,
body.ar .lang-ar.flex,
body.ar div.lang-ar.two-cols { display: grid !important; }
html.ar span.lang-ar,
html.ar a.lang-ar,
html.ar strong.lang-ar,
html.ar button .lang-ar,
body.ar span.lang-ar,
body.ar a.lang-ar,
body.ar strong.lang-ar,
body.ar button .lang-ar { display: inline !important; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: #FBF7F4;
  border-bottom: 1px solid var(--line);
  direction: ltr;
  isolation: isolate;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.logo-wrap img {
  height: 42px;
  width: auto;
  border-radius: 50%;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active { color: var(--brand); }

.lang-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--brand);
  background: var(--white);
  color: var(--brand-deep);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 4.4rem;
  position: relative;
  z-index: 2;
  direction: ltr;
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: var(--brand-deep);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: #A84A2F; }

.btn-dark { background: var(--brand); color: var(--white); }
.btn-dark:hover { background: var(--brand-deep); }

.btn-ghost {
  background: transparent;
  color: var(--brand-deep);
  border-color: rgba(122, 46, 40, 0.35);
}

.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-light {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-light:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.2); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 4.5rem 0;
}

.section-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  color: var(--ink);
  max-width: 24ch;
}

.section-lead {
  font-size: 1.08rem;
  max-width: 58ch;
  margin-top: 0.75rem;
}

.band {
  background: var(--sand);
  border-block: 1px solid var(--line);
}

.band-steel {
  background: var(--steel);
  color: var(--white);
  border: none;
}

.band-steel p { color: rgba(255, 255, 255, 0.78); }
.band-steel h2 { color: var(--white); }
.band-steel .section-kicker { color: #E8A48E; }

/* Footer */
.site-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* WhatsApp — secondary, sits above Ask J Tech on the same corner */
.whatsapp-wrapper {
  position: fixed;
  bottom: 5.85rem;
  inset-inline-end: 1.25rem;
  z-index: 1000;
}
body.chat-open .whatsapp-wrapper {
  opacity: 0;
  pointer-events: none;
}

.whatsapp-main-btn {
  background: #25D366;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease;
  border: none;
  padding: 0;
}

.whatsapp-main-btn:hover { transform: translateY(-4px); }
.whatsapp-main-btn img { width: 28px; height: 28px; }

.whatsapp-menu {
  position: absolute;
  bottom: 70px;
  inset-inline-end: 0;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  min-width: 210px;
  border: 1px solid var(--line);
}

.whatsapp-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.whatsapp-menu a {
  display: block;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.whatsapp-menu a:last-child { border-bottom: none; }
.whatsapp-menu a:hover { background: var(--brand-soft); }

/* Captcha modal */
#captchaModal {
  position: fixed;
  inset: 0;
  background: rgba(28, 20, 18, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 1rem;
}

#captchaContent {
  background: var(--white);
  padding: 1.35rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  min-width: min(100%, 300px);
}

#captchaCanvas {
  border: 1px solid var(--line);
  margin-bottom: 0.85rem;
  width: 100%;
  max-width: 220px;
}

#captchaContent input {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-family: inherit;
}

#captchaContent button {
  padding: 0.7rem 1.2rem;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

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

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.service-card {
  border-top: 2px solid var(--brand);
  padding-top: 1.1rem;
}
.service-card h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
  color: var(--ink);
}
@media (max-width: 800px) {
  .service-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.contact-line {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
}
.contact-line a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

/* Chatbot — bottom-right; WhatsApp sits above it as a secondary step */
.chatbot {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: min(22rem, calc(100vw - 2.5rem));
}
.chatbot-toggle {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0;
  padding-inline: 0.45rem 1rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chatbot-toggle img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  display: block;
}
.chatbot-panel {
  width: min(22rem, calc(100vw - 2.5rem));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(32rem, 72vh);
}
.chatbot-panel[hidden] { display: none !important; }
.chatbot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--brand-deep);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}
.chatbot-head-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.chatbot-head-copy { flex: 1; }
.chatbot-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.chatbot-log {
  padding: 0.75rem 0.85rem;
  overflow-y: auto;
  flex: 1;
  min-height: 9rem;
  font-size: 0.88rem;
  color: var(--ink);
}
.chatbot-msg { margin: 0 0 0.65rem; line-height: 1.45; }
.chatbot-msg.user { color: var(--muted); }
.chatbot-msg.bot a,
.chatbot-more a { color: var(--brand); font-weight: 600; text-decoration: none; }
.chatbot-handoff {
  padding: 0.45rem 0.85rem 0.55rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.chatbot-handoff[hidden] { display: none !important; }
.chatbot-handoff p {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.chatbot-handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.chatbot-handoff-actions a,
.chatbot-handoff-actions button {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.chatbot-handoff-actions a {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.chatbot-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem 0.7rem;
  border-top: 1px solid var(--line);
}
.chatbot-form input {
  flex: 1;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
}
.chatbot-form button {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

