/* =====================================================
   Levra CRM — Shared styles (base, navbar, footer)
   Loaded on every page BEFORE the page-specific CSS.
   ===================================================== */

:root {
  --primary: #239cfe;
  --primary-dark: #0d75c9;
  --accent: #6758e9;
  --accent-dark: #5040d8;

  --text: #272a34;
  --muted: #767988;
  --muted-2: #a0a3ae;

  --bg: #f6f8fb;
  --white: #ffffff;
  --line: #e6ebf2;
  --border: #ebe8f2;

  --green: #30bf86;
  --orange: #f5a455;
  --pink: #e276bd;

  --dark: #171923;
  --dark-2: #222632;

  --shadow-sm: 0 10px 30px rgba(29, 44, 77, .06);
  --shadow-md: 0 25px 65px rgba(29, 44, 77, .09);
  --shadow-lg: 0 40px 100px rgba(29, 44, 77, .15);
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;

  font-family: "Estedad", Tahoma, sans-serif;
  color: var(--text);
  line-height: 1.8;

  background:
    radial-gradient(circle at 90% 0%, rgba(35, 156, 254, .09), transparent 25%),
    radial-gradient(circle at 2% 25%, rgba(103, 88, 233, .06), transparent 22%),
    var(--bg);
}

body::before {
  content: "";

  position: fixed;
  inset: 0;
  z-index: -2;

  pointer-events: none;

  opacity: .28;

  background-image:
    linear-gradient(rgba(30, 50, 90, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 50, 90, .025) 1px, transparent 1px);

  background-size: 34px 34px;

  mask-image: linear-gradient(to bottom, black, transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a,
button,
input,
textarea,
select {
  font-family: "Estedad", Tahoma, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);

  transition:
    opacity .7s ease,
    transform .7s cubic-bezier(.22, 1, .36, 1);

  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1,
.reveal-delay-1 {
  transition-delay: .08s;
}

.delay-2,
.reveal-delay-2 {
  transition-delay: .16s;
}

.delay-3,
.reveal-delay-3 {
  transition-delay: .24s;
}

.delay-4,
.reveal-delay-4 {
  transition-delay: .32s;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 12px;
  z-index: 1000;

  padding: 0 16px;
}

.nav-inner {
  width: min(1240px, 100%);
  max-height: 70px;

  margin: auto;
  padding: 8px 12px 8px 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 20px;

  background: rgba(255, 255, 255, .84);

  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);

  box-shadow: 0 15px 50px rgba(37, 30, 86, .08);
}

.logo img {
  width: 115px;
  display: block;
  object-fit: contain;
  margin-right: 8px;
}

.nav-menu {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: start;
  gap: 4px;
}

.nav-link {
  min-height: 44px;

  padding: 0 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  color: #646a77;

  font-size: 14px;
  font-weight: 700;

  transition: .25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: #eef8ff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-cta {
  min-height: 44px;

  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 13px;

  color: white;

  background: linear-gradient(135deg, var(--primary), #277fe1);

  box-shadow: 0 10px 25px rgba(35, 156, 254, .2);

  font-size: 11px;
  font-weight: 800;

  transition: .25s ease;
}

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

.mobile-toggle {
  display: none;

  width: 44px;
  height: 44px;

  border-radius: 13px;

  color: var(--primary);
  background: #eef8ff;

  font-size: 20px;
}

/* ---------- Buttons ---------- */

.primary-btn,
.secondary-btn {
  min-height: 52px;

  padding: 0 21px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  border-radius: 14px;

  font-size: 11px;
  font-weight: 800;

  transition: .3s ease;
}

.primary-btn {
  color: white;

  background: linear-gradient(135deg, var(--primary), #277fe0);

  box-shadow: 0 14px 30px rgba(35, 156, 254, .18);
}

.secondary-btn {
  color: #565c68;

  border: 1px solid #e0e5eb;

  background: rgba(255, 255, 255, .72);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-3px);
}

/* ---------- Footer ---------- */

footer {
  padding: 55px 0 28px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 50px;

  padding-bottom: 45px;

  border-bottom: 1px solid var(--line);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand img {
  width: 145px;
  display: block;
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 2;
}

.footer-links {
  display: flex;
  gap: 75px;
}

.footer-column h4 {
  margin-bottom: 15px;
  font-size: 11px;
}

.footer-column a {
  display: block;
  margin-bottom: 10px;

  color: var(--muted);

  font-size: 10px;

  transition: .2s ease;
}

.footer-column a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 23px;

  display: flex;
  justify-content: space-between;

  color: var(--muted-2);
  font-size: 9px;
}

/* ---------- Responsive ---------- */

@media (max-width: 850px) {

  .nav-menu {
    position: absolute;

    top: 79px;
    right: 18px;
    left: 18px;

    padding: 10px;

    display: none;
    flex-direction: column;
    align-items: stretch;

    border: 1px solid var(--line);
    border-radius: 18px;

    background: rgba(255, 255, 255, .97);

    box-shadow: 0 25px 60px rgba(30, 40, 75, .13);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-cta {
    display: none;
  }

}

@media (max-width: 650px) {

  .container {
    width: min(100% - 26px, 1240px);
  }

  .navbar {
    top: 8px;
    padding: 0 10px;
  }

  .nav-inner {
    min-height: 64px;
  }

  .logo img {
    width: 125px;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-links {
    width: 100%;
    justify-content: space-between;
    gap: 18px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }

}

@media (max-width: 440px) {

  .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

}

/* ---------- Inline brand name ---------- */

.brand {
  color: var(--primary);
  font-weight: 800;
}


/* =====================================================
   Consultation form («دریافت مشاوره»)
   ===================================================== */

.consult-section {
  padding: 100px 0;
}

.consult-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.consult-copy .section-label {
  margin-bottom: 12px;
}

.consult-copy h2 {
  color: #24212f;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.45;
  margin-bottom: 16px;
  font-weight: 900;
}

.consult-copy p {
  color: var(--muted);
  font-size: 13px;
  line-height: 2.2;
  margin-bottom: 24px;
}

.consult-points {
  display: grid;
  gap: 12px;
}

.consult-point {
  display: flex;
  align-items: center;
  gap: 10px;

  color: #5d5967;
  font-size: 12px;
  font-weight: 600;
}

.consult-form {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-md);
}

.consult-form h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.consult-form > p {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 22px;
}

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

.form-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.form-field label {
  color: #4c4957;
  font-size: 11px;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: #fbfbfe;
  color: var(--text);

  font-size: 12px;

  transition: border-color .2s ease, box-shadow .2s ease;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(35, 156, 254, .12);
}

.form-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  border-radius: 14px;

  color: white;
  background: linear-gradient(135deg, var(--primary), #277fe0);

  box-shadow: 0 14px 30px rgba(35, 156, 254, .18);

  font-size: 12px;
  font-weight: 800;

  transition: .3s ease;
}

.form-submit:hover:not(:disabled) {
  transform: translateY(-3px);
}

.form-submit:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.form-status {
  min-height: 22px;
  margin-top: 12px;

  font-size: 11px;
  font-weight: 700;
}

.form-status.success { color: var(--green); }
.form-status.error   { color: #e05b5b; }

/* ---------- Chatbot widget ---------- */

.chatbot {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 2000;

  font-family: "Estedad", Tahoma, sans-serif;
}

.chatbot-launcher {
  width: 60px;
  height: 60px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: white;
  font-size: 24px;

  background: linear-gradient(135deg, var(--primary), #277fe0);

  box-shadow: 0 15px 35px rgba(35, 156, 254, .35);

  transition: .3s ease;
}

.chatbot-launcher:hover {
  transform: translateY(-4px) scale(1.04);
}

.chatbot-panel {
  position: absolute;
  bottom: 78px;
  right: 0;

  width: min(360px, calc(100vw - 40px));
  height: 500px;
  max-height: calc(100vh - 130px);

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 22px;

  background: rgba(255, 255, 255, .98);

  box-shadow: 0 30px 80px rgba(30, 40, 75, .22);

  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.98);

  transition: .28s ease;
}

.chatbot.open .chatbot-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-head {
  padding: 15px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: white;

  background: linear-gradient(135deg, #1d2a45, #239cfe);
}

.chatbot-head-text strong {
  display: block;
  font-size: 13px;
}

.chatbot-head-text small {
  display: flex;
  align-items: center;
  gap: 6px;

  opacity: .85;
  font-size: 9px;
}

.chatbot-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .25);
}

.chatbot-close {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  color: white;
  background: rgba(255, 255, 255, .14);

  font-size: 17px;
}

.chatbot-quick {
  padding: 10px 12px;

  display: flex;
  gap: 7px;

  overflow-x: auto;

  border-bottom: 1px solid var(--line);
}

.chatbot-chip {
  flex: none;
  padding: 7px 12px;

  border: 1px solid #dfe9f5;
  border-radius: 20px;

  background: #f4f9ff;
  color: #3d6a94;

  font-size: 10px;
  font-weight: 700;

  transition: .2s ease;
}

.chatbot-chip:hover {
  background: #e6f2ff;
  border-color: var(--primary);
}

.chatbot-messages {
  flex: 1;

  padding: 15px 12px;

  display: flex;
  flex-direction: column;
  gap: 9px;

  overflow-y: auto;

  background: #f7fafd;
}

.chatbot-msg {
  max-width: 82%;
  padding: 10px 14px;

  border-radius: 15px;

  font-size: 11.5px;
  line-height: 1.9;

  white-space: pre-line;
  word-break: break-word;
}

.chatbot-msg.bot {
  align-self: flex-start;

  color: #2c3a4d;
  background: white;

  border: 1px solid #e8eef5;

  border-top-right-radius: 6px;
}

.chatbot-msg.user {
  align-self: flex-end;

  color: white;
  background: linear-gradient(135deg, var(--primary), #277fe0);

  border-top-left-radius: 6px;
}

.chatbot-typing {
  opacity: .75;
  font-style: italic;
}

.chatbot-input-row {
  padding: 11px;

  display: flex;
  gap: 8px;

  border-top: 1px solid var(--line);
  background: white;
}

.chatbot-input-row input {
  flex: 1;

  padding: 10px 13px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: #f8fafc;

  font-family: inherit;
  font-size: 11.5px;
}

.chatbot-input-row input:focus {
  outline: none;
  border-color: var(--primary);
}

.chatbot-input-row button {
  padding: 0 16px;

  border-radius: 12px;

  color: white;
  background: linear-gradient(135deg, var(--primary), #277fe0);

  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 900px) {

  .consult-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .consult-copy {
    text-align: center;
  }

  .consult-points {
    justify-items: center;
  }

}

@media (max-width: 650px) {

  .consult-section {
    padding: 70px 0;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .consult-form {
    padding: 24px 20px;
  }

  .chatbot {
    bottom: 14px;
    left: 14px;
  }

  .chatbot-launcher {
    width: 54px;
    height: 54px;
    font-size: 21px;
  }

  .chatbot-panel {
    bottom: 72px;
  }

}
