/* ============================================================
   NEXORA CORP — WHITE & MAROON THEME
   ============================================================ */

:root {
  --maroon:       #7B1C2E;
  --maroon-deep:  #5A1321;
  --maroon-light: #9E2740;
  --maroon-pale:  #F9F0F2;
  --white:        #FFFFFF;
  --off-white:    #FAF8F8;
  --gray-100:     #F4F1F1;
  --gray-300:     #D8D0D1;
  --gray-500:     #9A8E90;
  --gray-700:     #4A3E40;
  --gray-900:     #1C1214;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --radius:       12px;
  --shadow-sm:    0 2px 8px rgba(123,28,46,0.08);
  --shadow-md:    0 8px 30px rgba(123,28,46,0.14);
  --shadow-lg:    0 20px 60px rgba(123,28,46,0.18);
  --transition:   0.25s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--maroon);
  color: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.logo-mark.sm { width: 28px; height: 28px; font-size: 14px; border-radius: 6px; }

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--gray-900);
}

.logo-dot { color: var(--maroon); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: 8px;
  transition: var(--transition);
}

.nav-links a:hover { background: var(--maroon-pale); color: var(--maroon); }

.nav-links .nav-cta {
  background: var(--maroon);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 500;
}

.nav-links .nav-cta:hover { background: var(--maroon-deep); color: var(--white); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--maroon);
  color: var(--white);
  padding: 13px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover { background: var(--maroon-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  display: inline-block;
  color: var(--maroon);
  font-weight: 500;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: 8px;
  transition: var(--transition);
}

.btn-ghost:hover { background: var(--maroon-pale); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  top: -40px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--maroon-pale) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.hero-title em { font-style: italic; color: var(--maroon); }

.hero-sub {
  font-size: 16px;
  color: var(--gray-500);
  max-width: 440px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 20px 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card.s2 { margin-left: 40px; border-left: 3px solid var(--maroon); }
.stat-card.s3 { margin-left: 20px; }

.stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ===== SERVICES ===== */
.services { background: var(--off-white); padding: 100px 32px; }

.section-container { max-width: 1200px; margin: 0 auto; }

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--maroon);
  font-weight: 500;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 48px;
  line-height: 1.2;
}

.section-title em { font-style: italic; color: var(--maroon); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: var(--transition);
  cursor: default;
}

.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--maroon-light); }

.service-card.featured {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--white);
}

.service-card.featured h3,
.service-card.featured p { color: rgba(255,255,255,0.9); }

.service-card.featured .service-icon { background: rgba(255,255,255,0.15); }

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--maroon-pale);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--gray-900);
}

.service-card p { font-size: 14px; color: var(--gray-500); line-height: 1.65; }

/* ===== ABOUT STRIP ===== */
.about-strip { padding: 100px 32px; background: var(--white); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  font-size: 15px;
  color: var(--gray-500);
  margin-bottom: 32px;
  max-width: 440px;
  line-height: 1.75;
}

.about-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.metric {
  border-left: 3px solid var(--maroon);
  padding-left: 18px;
}

.metric span {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1;
  margin-bottom: 4px;
}

.metric p { font-size: 13px; color: var(--gray-500); }

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 40px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand .logo-text { color: var(--white); font-size: 16px; }
.footer-copy { font-size: 13px; }

.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; transition: var(--transition); }
.footer-links a:hover { color: var(--white); }

/* ======================================================
   CHAT WIDGET
   ====================================================== */

#chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; }

/* ---- Tooltip ---- */
#chat-tooltip {
  position: absolute;
  bottom: 76px;
  right: 0;
  background: var(--gray-900);
  color: var(--white);
  font-size: 13px;
  font-family: var(--font-body);
  padding: 8px 14px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  animation: tooltipFade 4s ease forwards;
}

#chat-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: var(--gray-900);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

@keyframes tooltipFade {
  0%   { opacity: 0; transform: translateY(4px); }
  15%  { opacity: 1; transform: translateY(0); }
  75%  { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* ---- FAB Button ---- */
#chat-button {
  width: 58px;
  height: 58px;
  background: var(--maroon);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(123,28,46,0.45);
  transition: var(--transition);
  position: relative;
  outline: none;
}

#chat-button:hover { background: var(--maroon-deep); transform: scale(1.07); }
#chat-button:active { transform: scale(0.96); }

#chat-button svg { width: 24px; height: 24px; color: var(--white); display: block; }

.btn-icon { display: flex; align-items: center; justify-content: center; position: relative; }
.btn-icon.hidden { display: none; }

/* Pulse ring */
.pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 2px solid var(--maroon-light);
  animation: pulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: .7; }
  100% { transform: translate(-50%,-50%) scale(1.9); opacity: 0; }
}

/* ---- Chat Box ---- */
#chat-box {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  height: 500px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(90,19,33,0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.25s ease;
  transform: scale(1);
  opacity: 1;
}

#chat-box.chat-hidden {
  transform: scale(0.85);
  opacity: 0;
  pointer-events: none;
}

/* ---- Header ---- */
.chat-header {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-header-left { display: flex; align-items: center; gap: 12px; }

.agent-avatar {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 16px;
}

.agent-name { font-size: 14px; font-weight: 600; color: var(--white); line-height: 1.2; }

.agent-status {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.chat-close {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-close:hover { background: rgba(255,255,255,0.25); }

/* ---- Messages ---- */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--off-white);
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  animation: msgIn 0.2s ease;
}

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

.user {
  background: var(--maroon);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bot {
  background: var(--white);
  color: var(--gray-900);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-300);
}

/* ---- Quick Replies ---- */
.quick-replies {
  padding: 10px 14px 6px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  background: var(--off-white);
  border-top: 1px solid var(--gray-100);
}

.quick-replies button {
  background: var(--white);
  border: 1.5px solid var(--maroon);
  color: var(--maroon);
  font-size: 11.5px;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.quick-replies button:hover { background: var(--maroon); color: var(--white); }

/* ---- Input ---- */
.chat-input-area {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--gray-300);
  background: var(--white);
  gap: 10px;
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  border: 1.5px solid var(--gray-300);
  border-radius: 24px;
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--gray-900);
  outline: none;
  background: var(--off-white);
  transition: var(--transition);
}

.chat-input-area input:focus { border-color: var(--maroon); background: var(--white); }
.chat-input-area input::placeholder { color: var(--gray-500); }

#send-btn {
  width: 38px;
  height: 38px;
  background: var(--maroon);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  flex-shrink: 0;
  transition: var(--transition);
}

#send-btn:hover { background: var(--maroon-deep); transform: scale(1.06); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 48px 24px; gap: 40px; }
  .hero-visual { flex-direction: row; flex-wrap: wrap; }
  .stat-card.s2, .stat-card.s3 { margin-left: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .nav-links { display: none; }
  #chat-box { width: calc(100vw - 32px); right: -12px; }
}
/* ============================================================
   ✅ ADDED: Language Selector for Chat Widget
   ============================================================ */

.lang-selector {
  padding: 14px 16px 12px;
  border-top: 1px solid var(--gray-100);
  background: var(--off-white);
  transition: opacity 0.3s ease, max-height 0.35s ease, padding 0.3s ease;
  overflow: hidden;
  max-height: 130px;
  flex-shrink: 0;
}

.lang-selector.lang-selector-hidden {
  opacity: 0;
  max-height: 0;
  padding: 0;
  pointer-events: none;
}

.lang-prompt {
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
  margin: 0 0 10px;
  line-height: 1.65;
  font-family: var(--font-body);
}

.lang-prompt-ms {
  font-size: 11px;
  color: var(--gray-300);
}

.lang-btn-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.lang-choice-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--maroon);
  background: var(--white);
  color: var(--maroon);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lang-choice-btn:hover {
  background: var(--maroon);
  color: var(--white);
}

.lang-choice-btn.selected {
  background: var(--maroon);
  color: var(--white);
}

.lang-flag { font-size: 14px; line-height: 1; }

/* Quick replies hidden before lang chosen */
.quick-replies.lang-hidden { display: none !important; }

/* Disabled input/send before lang chosen */
#userInput:disabled      { opacity: 0.45; cursor: not-allowed; }
#send-btn:disabled       { opacity: 0.38; cursor: not-allowed; transform: none !important; }
/* ===== SOFTEA AVATAR IMAGE (added) ===== */
.agent-avatar {
  overflow: hidden;
  padding: 0;
}
.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-btn-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ===== SOFTEA HOVER WAVE EFFECT (added) ===== */
#chat-button {
  position: relative;
}

.chat-btn-avatar {
  transition: transform 0.3s ease;
}

#chat-button:hover .chat-btn-avatar {
  animation: avatar-wiggle 0.6s ease-in-out;
}

@keyframes avatar-wiggle {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-8deg); }
  40%  { transform: rotate(7deg); }
  60%  { transform: rotate(-5deg); }
  80%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

.wave-badge {
  position: absolute;
  bottom: -2px;
  right: -6px;
  font-size: 16px;
  transform-origin: 70% 70%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#chat-button:hover .wave-badge {
  opacity: 1;
  animation: hand-wave 0.6s ease-in-out 2;
}

@keyframes hand-wave {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-15deg); }
  40%  { transform: rotate(12deg); }
  60%  { transform: rotate(-10deg); }
  80%  { transform: rotate(8deg); }
  100% { transform: rotate(0deg); }
}