/************************************************************
 * XReach Global Stylesheet — Multilingual Premium Edition
 * Version: Final v2.0 (Bubble + Timestamp Chat UI)
 * Fully Merged • Fully Enhanced • No Missing Sections
 ************************************************************/

/* =========================================================
   ROOT VARIABLES — Light & Dark Mode
========================================================= */
:root {
  --font: 'Poppins', sans-serif;

  /* LIGHT MODE COLORS */
  --light-bg: #f9fcff;
  --light-surface: #ffffff;
  --light-text: #063245;

  /* DARK MODE COLORS */
  --dark-bg: #041b36;
  --dark-surface: #062544;
  --dark-text: #d7e2f2;

  /* BRAND ACCENTS */
  --accent: #00ffc6;
  --accent2: #0099ff;
  --accent-soft: rgba(0, 255, 198, 0.25);

  /* GRADIENTS */
  --grad-hero: linear-gradient(135deg, #041b36, #003355, #005577);
  --grad-section: linear-gradient(180deg, #021226, #041b36);
  --grad-tech: linear-gradient(135deg, #03142a, #00324d, #004c63);

  /* SHAPES & EFFECTS */
  --radius: 16px;
  --shadow-soft: 0 4px 18px rgba(0,0,0,0.18);
  --shadow-strong: 0 10px 35px rgba(0,255,198,0.25);

  /* SPEEDS */
  --fast: 0.25s ease;
  --med: 0.35s ease;
}

/* Active Mode */
.light {
  --bg: var(--light-bg);
  --surface: var(--light-surface);
  --text: var(--light-text);
}
.dark {
  --bg: var(--dark-bg);
  --surface: var(--dark-surface);
  --text: var(--dark-text);
}

/* =========================================================
   GLOBAL RESET / BODY
========================================================= */
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg, var(--dark-bg));
  color: var(--text, var(--dark-text));
  overflow-x: hidden;
  transition: background var(--med), color var(--med);
}

section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #020c1b;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.logo {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.4rem;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--fast);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* =========================================================
   HERO SECTION
========================================================= */
.hero {
  background: var(--grad-hero);
  padding: 140px 20px;
  text-align: center;
  color: white;
}
.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  color: #e9faff;
}
.hero p {
  max-width: 650px;
  margin: 0 auto;
  color: #d3eaff;
}
.buttons {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.btn {
  padding: 0.9rem 1.8rem;
  border-radius: 32px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--fast);
}
.btn.primary {
  background: var(--accent);
  color: #002a32;
}
.btn.secondary {
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

/* =========================================================
   TAX HIGHLIGHT
========================================================= */
.tax-highlight {
  background: linear-gradient(135deg, #f7fafa, #e8f5ff);
  color: #042f40;
  padding: 100px 40px;
}
.tax-highlight-content {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}
.tax-text h2 {
  color: #003e5c;
  font-size: 2rem;
}
.tax-image img {
  max-width: 480px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   SERVICES
========================================================= */
.services {
  padding: 100px 20px;
  background: var(--grad-section);
  text-align: center;
}
.services h2 {
  color: #00e4ff;
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.service-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  padding: 35px 25px;
  border-radius: var(--radius);
  color: white;
  text-align: left;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  transition: var(--med);
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0,255,200,0.25);
}

/* =========================================================
   WHY-US
========================================================= */
.why-us {
  padding: 100px 20px;
  background: #041b36;
  text-align: center;
}
.why-grid {
  max-width: 1000px;
  margin: auto;
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.why-card {
  padding: 35px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #021226, #042a4e);
  box-shadow: 0 6px 20px rgba(0,255,198,0.12);
  transition: var(--med);
}
.why-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 0 25px rgba(0,255,198,0.35);
}

/* =========================================================
   TECHNOLOGIES
========================================================= */
.technologies {
  padding: 100px 20px;
  background: var(--grad-tech);
  text-align: center;
}
.tech-showcase {
  max-width: 1000px;
  margin: auto;
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tech-card {
  background: linear-gradient(150deg, #03213f, #043757);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--med);
  position: relative;
}
.tech-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: var(--med);
}
.tech-card.active img {
  transform: scale(1.1);
  opacity: 0.85;
}
.tech-card.active {
  transform: scale(1.05);
  box-shadow: var(--shadow-strong);
}
.tech-details {
  display: none;
  padding: 18px;
  color: #b6d8e6;
  text-align: center;
}
.tech-card.active .tech-details {
  display: block;
  animation: fadeIn .6s ease;
}

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


/* =========================================================
   CONTACT
========================================================= */
.contact {
  padding: 100px 20px;
  text-align: center;
  background: #03142a;
}
.contact h2 {
  color: var(--accent);
  margin-bottom: 20px;
}
.contact p {
  color: #b9d4e6;
}
.contact-info p {
  margin: 6px 0;
  color: #d0e9f3;
}
.contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.contact a.btn {
  display: inline-block;
  margin-top: 20px;
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  background: #010b1b;
  padding: 35px 20px;
  text-align: center;
  color: #91b8d6;
  border-top: 1px solid rgba(0, 255, 198, 0.1);
}
.footer-content p {
  margin-bottom: 10px;
  color: #cbe8ff;
  font-weight: 500;
}
.footer-links a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 6px;
  transition: var(--fast);
}
.footer-links a:hover {
  text-decoration: underline;
  color: #00e0ff;
}

/* =========================================================
   TAX PAGE — CONTENT
========================================================= */
.tax-body {
  background: #f9fbfc;
  color: #042f40;
}

.tax-navbar {
  background: #e6f2f7;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tax-hero {
  background: linear-gradient(120deg, #dff7ff, #f8ffff);
  padding: 100px 30px;
  text-align: center;
}
.tax-hero h1 {
  color: #003e5c;
}

.tax-services {
  padding: 80px 20px;
  text-align: center;
}

.tax-intro {
  max-width: 700px;
  margin: 0 auto 50px;
  color: #335b66;
  font-weight: 500;
}

.tax-grid {
  display: grid;
  gap: 30px;
  max-width: 1000px;
  margin: auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tax-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: var(--med);
  overflow: hidden;
}
.tax-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.tax-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

/* =========================================================
   TAX PROCESS
========================================================= */
.tax-process {
  background: linear-gradient(120deg, #f2fbff, #ffffff);
  text-align: center;
  padding: 100px 20px;
}

.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1000px;
  margin: 40px auto 0;
}

.step {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  width: 300px;
  padding: 30px;
  transition: var(--med);
}
.step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.step-num {
  background: var(--accent);
  color: #003e5c;
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  line-height: 36px;
  display: inline-block;
  margin-bottom: 10px;
}

/* =========================================================
   TAX CONTACT
========================================================= */
.tax-contact {
  background: linear-gradient(120deg, #eafaff, #ffffff);
  text-align: center;
  padding: 80px 20px;
}
.tax-contact h2 {
  color: #003e5c;
}
.tax-contact p {
  color: #04364f;
  font-weight: 500;
}
.tax-contact .contact-info p {
  color: #004d61;
  font-size: 1rem;
  margin: 6px 0;
}
.tax-contact .btn.primary {
  background: #00ffc6;
  color: #003e5c;
  padding: 0.9rem 2rem;
  border-radius: 40px;
  font-weight: 700;
  transition: var(--fast);
}
.tax-contact .btn.primary:hover {
  background: #00e0af;
  transform: translateY(-3px);
}

/* =========================================================
   AI ASSISTANT — BUBBLE + SLIDE-IN PANEL
========================================================= */

/* Bubble */
#xreach-chat-bubble {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #002a38;
  font-size: 30px;
  cursor: pointer;

  box-shadow: 0 6px 18px rgba(0,255,198,0.35);
  z-index: 99998;
  transition: var(--fast);
}

#xreach-chat-bubble:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,255,198,0.45);
}

/* Panel */
#xreach-chat-modal {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;

  background: rgba(2, 12, 27, 0.94);
  backdrop-filter: blur(14px);
  color: var(--text);

  display: flex;
  flex-direction: column;
  opacity: 0;
  z-index: 99997;
  transition: right .35s ease, opacity .35s ease;
}

#xreach-chat-modal.open {
  right: 0;
  opacity: 1;
}

/* Header */
.xreach-chat-header {
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #001820;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#xreach-chat-close {
  background: transparent;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #001820;
}
#xreach-chat-close:hover {
  transform: scale(1.15);
}

/* Language Selector — Multilingual */
.xreach-lang-select {
  margin-top: 10px;
  padding: 0 15px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lang-chip {
  padding: 6px 14px;
  background: rgba(0,255,198,0.18);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 18px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--fast);
}
.lang-chip:hover,
.lang-chip.active {
  background: var(--accent);
  color: #003e5c;
}

/* Chat Suggestions */
.xreach-suggestions {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0,255,198,0.18);
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  cursor: pointer;
  transition: var(--fast);
}
.chip:hover {
  background: var(--accent);
  color: #003e5c;
}

/* Messages */
.xreach-chat-messages {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* User bubble */
.xreach-chat-message.user .bubble {
  background: var(--accent2);
  color: #001820;
  padding: 12px 14px;
  border-radius: 14px;
  max-width: 80%;
  align-self: flex-end;
}

/* Bot bubble */
.xreach-chat-message.bot .bubble {
  background: #0a2a4e;
  color: #d7e2f2;
  padding: 12px 14px;
  border-radius: 14px;
  border-left: 4px solid var(--accent);
  max-width: 85%;
}

/* Timestamp */
.time {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 3px;
}

/* Typing */
#xreach-typing {
  display: none;
  padding: 10px 18px;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Input */
.xreach-chat-input-area {
  padding: 12px;
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
#xreach-chat-input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,198,0.2);
  background: #03142a;
  color: var(--text);
  outline: none;
}
#xreach-chat-input::placeholder {
  color: #7fa2b5;
}
.send-btn {
  padding: 12px 18px;
  background: var(--accent);
  color: #003e5c;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--fast);
}
.send-btn:hover {
  background: #00e0af;
}

/* Light Mode Overrides */
.light #xreach-chat-modal {
  background: rgba(255,255,255,0.85);
  color: #063245;
}
.light .bubble {
  background: #ffffff;
  color: #063245;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media(max-width: 480px) {
  #xreach-chat-modal {
    width: 100%;
  }
  #xreach-chat-bubble {
    bottom: 16px;
    right: 16px;
  }
  .tech-card img {
    height: 150px;
  }
}
