/**
 * Bubble 2026 Refresh — Core Shared Styles
 * Loaded on ALL pages of the 2026 redesign.
 * Contains: reset, variables, typography, header, footer, buttons,
 *           floating chat input, chat side panel, animations, responsive.
 */

/* ===========================
   1. RESET & CSS VARIABLES
   =========================== */

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

html {
  scroll-behavior: smooth;
}

:root {
  --primary: #111111;
  --secondary: #666666;
  --muted: #999999;
  --border: rgba(0, 0, 0, 0.08);
  --bg-white: #FFFFFF;
  --bg-subtle: #F8F8F8;
  --purple: #93acf0;
  --purple-light: rgba(147, 172, 240, 0.15);
  --container-max: 1200px;
  --container-padding: 2rem;
  --nav-gap: 2.5rem;
}

/* ===========================
   2. BASE TYPOGRAPHY
   =========================== */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-white);
  color: var(--primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ===========================
   3. HEADER
   =========================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

.logo:hover {
  color: var(--purple);
}

.logo svg {
  width: 28px;
  height: 28px;
}

/* Desktop navigation */
nav {
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

nav a {
  font-size: 0.9rem;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--purple);
  transition: width 0.3s;
}

nav a:hover {
  color: var(--primary);
}

nav a:hover::after {
  width: 100%;
}

nav a.active {
  color: var(--primary);
}

nav a.active::after {
  width: 100%;
}

/* Language switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.lang-switch button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
  transition: color 0.3s;
  font-family: inherit;
}

.lang-switch button.active,
.lang-switch button:hover {
  color: var(--primary);
  font-weight: 600;
}

/* Mobile hamburger menu */
.mobile-menu-toggle,
.hamburger-toggle,
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 101;
}

.mobile-menu-toggle span,
.hamburger-toggle span,
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.open span:nth-child(1),
.hamburger-toggle.open span:nth-child(1),
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.open span:nth-child(2),
.hamburger-toggle.open span:nth-child(2),
.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3),
.hamburger-toggle.open span:nth-child(3),
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav,
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 101; /* Must be above header (z-index: 100) */
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-nav.open,
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-nav-content a,
.mobile-nav-content .lang-switch {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav-overlay.open .mobile-nav-content a,
.mobile-nav-overlay.open .mobile-nav-content .lang-switch {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-overlay.open .mobile-nav-content a:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav-overlay.open .mobile-nav-content a:nth-child(2) { transition-delay: 0.1s; }
.mobile-nav-overlay.open .mobile-nav-content a:nth-child(3) { transition-delay: 0.15s; }
.mobile-nav-overlay.open .mobile-nav-content a:nth-child(4) { transition-delay: 0.2s; }
.mobile-nav-overlay.open .mobile-nav-content .lang-switch { transition-delay: 0.25s; }

.mobile-nav a,
.mobile-nav-overlay a,
.mobile-nav-links a {
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.mobile-nav a:hover,
.mobile-nav a.active,
.mobile-nav-overlay a:hover,
.mobile-nav-links a:hover {
  color: var(--purple);
}

.mobile-nav .lang-switch,
.mobile-nav-overlay .lang-switch,
.mobile-nav-lang .lang-switch {
  margin-top: 1rem;
}

.mobile-nav .lang-switch button,
.mobile-nav-overlay .lang-switch button,
.mobile-nav-lang .lang-switch button {
  font-size: 1rem;
  padding: 0.5rem 1rem;
}

/* Mobile nav header (close button variant) */
.mobile-nav-header {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mobile-nav-lang {
  margin-top: 1rem;
}

/* ===========================
   4. BUTTONS
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--primary);
}

/* Button active (press) states — smooth click feedback */
.btn:active,
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}

/* Button overrides for dark background sections */
.b2b-section .btn-primary,
.final-cta .btn-primary,
.will-to-empower .btn-primary,
.waitlist .btn-primary,
.cta-section .btn-primary {
  background: white;
  color: var(--primary);
  border: 1px solid white;
}

.b2b-section .btn-primary:hover,
.final-cta .btn-primary:hover,
.will-to-empower .btn-primary:hover,
.waitlist .btn-primary:hover,
.cta-section .btn-primary:hover {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
  transform: translateY(-2px);
}

.b2b-section .btn-secondary,
.final-cta .btn-secondary,
.will-to-empower .btn-secondary,
.waitlist .btn-secondary,
.cta-section .btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.b2b-section .btn-secondary:hover,
.final-cta .btn-secondary:hover,
.will-to-empower .btn-secondary:hover,
.waitlist .btn-secondary:hover,
.cta-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: white;
}

/* ===========================
   5. PURPLE HOVER TEXT ACCENTS
   =========================== */

/* Highlight spans in headings */
.highlight {
  color: var(--purple);
  transition: color 0.3s ease;
}

/* Interactive card titles → purple on card hover */
.card:hover h4,
.service-card:hover h4,
.example-card:hover h4,
.value-card:hover h4,
.path-card:hover h4,
.trust-item:hover h4,
.feature-item:hover h4,
.why-item:hover h4,
.testimonial-card:hover h5 {
  color: var(--purple);
  transition: color 0.3s ease;
}

/* Differentiation keyword headings (Finance, Tech, AI) */
.differentiation-item h5 {
  transition: color 0.3s ease;
}

.differentiation-item:hover h5 {
  color: var(--purple);
}

/* Example tags glow on card hover */
.example-card:hover .example-tag {
  background: var(--purple);
  color: white;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Blog card titles */
.blog-card:hover h3 {
  color: var(--purple);
  transition: color 0.3s ease;
}

/* Featured post title */
.featured-card:hover h2 {
  color: var(--purple);
  transition: color 0.3s ease;
}

/* Reference card titles */
.reference-card:hover .reference-title {
  color: var(--purple);
  transition: color 0.3s ease;
}

/* Footer links */
.footer-links a {
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--purple);
}

/* Ensure base transition on card titles for smooth out-transition */
.card h4,
.service-card h4,
.example-card h4,
.value-card h4,
.path-card h4,
.trust-item h4,
.feature-item h4,
.why-item h4,
.testimonial-card h5,
.blog-card h3,
.featured-card h2,
.reference-card .reference-title {
  transition: color 0.3s ease;
}

/* ===========================
   6. ANIMATIONS
   =========================== */

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

/* Scroll-triggered fade-in: starts hidden, animates when visible */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ===========================
   6. FOOTER
   =========================== */

footer {
  padding: 4rem 0 2rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--secondary);
  margin-top: 1rem;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--purple);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--purple);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-why-bubble {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.footer-why-bubble a {
  color: var(--purple);
  text-decoration: none;
}

/* ===========================
   7. FLOATING CHAT INPUT
   =========================== */

.floating-chat-input {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  pointer-events: auto;
}

.floating-chat-input.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

.floating-input-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  min-width: 400px;
  max-width: 600px;
}

.floating-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--primary);
  font-size: 0.95rem;
  font-family: 'Inter', system-ui, sans-serif;
  padding: 0.5rem 0;
}

.floating-input-field::placeholder {
  color: var(--muted);
}

.floating-input-field:focus {
  outline: none;
  box-shadow: none;
}

.floating-input-submit {
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.floating-input-submit:hover {
  background: var(--purple);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(147, 172, 240, 0.4);
}

.floating-input-submit:active {
  transform: scale(0.95);
}

.floating-input-submit svg {
  color: white;
}

/* ===========================
   8. CHAT SIDE PANEL
   Extracted from legacy styles.css
   =========================== */

.chat-side-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 1.5rem;
  width: min(400px, calc(100vw - 3rem));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px 0 0 24px;
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 1500;
}

.chat-side-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-side-panel.is-minimized {
  height: auto;
  max-height: 72px;
  bottom: 1.5rem;
  top: auto;
  border-radius: 18px;
  transform: translateX(0);
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
}

.chat-side-panel.is-minimized .chat-side-panel-messages,
.chat-side-panel.is-minimized .chat-side-panel-input-container {
  display: none;
}

.chat-side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  gap: 1rem;
}

.chat-side-panel-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-side-panel-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.chat-side-panel-titles {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chat-side-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.chat-side-panel-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
}

.chat-side-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-side-panel-actions button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.chat-side-panel-actions button:hover {
  background: rgba(229, 231, 235, 0.8);
  color: #111827;
}

.chat-side-panel-actions button:active {
  transform: scale(0.95);
}

.chat-side-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-side-panel-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-side-panel-messages::-webkit-scrollbar-thumb {
  background: rgba(55, 65, 81, 0.2);
  border-radius: 6px;
}

.chat-side-panel-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-side-panel-message {
  max-width: 85%;
  padding: 0.85rem 1.1rem;
  border-radius: 22px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  animation: messageAppear 0.3s ease-out both;
}

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

.chat-side-panel-message.bot {
  align-self: flex-start;
  background: #f3f4f6;
  color: #111827;
}

.chat-side-panel-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1f2937, #4b5563);
  color: #f9fafb;
}

.chat-side-panel-message h3,
.chat-side-panel-message h4,
.chat-side-panel-message h5 {
  margin: 0 0 0.6rem;
  font-weight: 600;
  color: inherit;
}

.chat-side-panel-message p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.chat-side-panel-message p:last-child {
  margin-bottom: 0;
}

.chat-side-panel-message ul,
.chat-side-panel-message ol {
  margin: 0 0 0.75rem 1.25rem;
  padding-left: 1.25rem;
}

.chat-side-panel-message li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.chat-side-panel-message code {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  font-size: 0.85rem;
}

.chat-side-panel-message a {
  color: inherit;
  text-decoration: underline;
  word-break: break-word;
}

.chat-side-panel-message .chat-list {
  margin: 0 0 0.75rem 1.1rem;
  padding-left: 1rem;
  list-style: disc;
}

.chat-side-panel-message .chat-list li {
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 0.25rem;
}

.chat-side-panel-message .chat-list li:last-child {
  margin-bottom: 0;
}

.chat-side-panel-message .chat-paragraph-spacer {
  height: 0.6rem;
}

.chat-side-panel-input-container {
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.chat-side-panel-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  padding: 0.85rem 1.1rem;
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  background: rgba(255, 255, 255, 0.85);
  color: #111827;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.chat-side-panel-input::placeholder {
  color: rgba(107, 114, 128, 0.8);
}

.chat-side-panel-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: none;
}

.chat-side-panel-input:focus-visible {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.chat-side-panel-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.95), rgba(55, 65, 81, 0.9));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.chat-side-panel-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(31, 41, 55, 0.25);
}

.chat-side-panel-send:active {
  transform: translateY(0);
}

body.chat-side-panel-open {
  overflow: hidden;
}

body.chat-side-panel-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1200;
  opacity: 1;
  pointer-events: none;
}

/* ===========================
   9. RESPONSIVE — TABLET (≤1024px)
   =========================== */

@media (max-width: 1024px) {
  .chat-side-panel {
    right: 1rem;
    width: min(360px, calc(100vw - 2rem));
  }
}

/* ===========================
   10. RESPONSIVE — NAV COLLAPSE (≤900px)
   =========================== */

@media (max-width: 900px) {
  /* Header: hide desktop nav, show hamburger */
  nav {
    display: none;
  }

  .mobile-menu-toggle,
  .hamburger-toggle,
  .hamburger {
    display: flex;
  }
}

/* ===========================
   10b. RESPONSIVE — MOBILE (≤768px)
   =========================== */

@media (max-width: 768px) {

  /* Footer: stack columns */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Chat side panel: full screen on mobile */
  .chat-side-panel {
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
    transform: translateX(100%);
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.2);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .chat-side-panel.is-open {
    transform: translateX(0);
  }

  .chat-side-panel.is-minimized {
    display: none;
  }

  .chat-side-panel-header {
    padding: 0.95rem 1.15rem;
  }

  .chat-side-panel-actions button {
    width: 44px;
    height: 44px;
  }

  .chat-side-panel-messages {
    padding: 1rem 1.1rem;
  }

  .chat-side-panel-input-container {
    padding: 1rem 1.1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  }

  /* Floating chat input: full width */
  .floating-chat-input {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: none;
  }

  .floating-chat-input.hidden {
    transform: translateY(20px);
  }

  .floating-input-container {
    min-width: unset;
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    gap: 0.5rem;
  }

  .floating-input-field {
    font-size: 16px; /* Prevents iOS auto-zoom */
  }

  .floating-input-submit {
    width: 44px;
    height: 44px;
    min-height: 44px;
    min-width: 44px;
  }

  .floating-input-submit:hover {
    transform: none;
  }

  .floating-input-submit:active {
    transform: scale(0.95);
  }
}

/* ===========================
   11. RESPONSIVE — SMALL MOBILE (≤480px)
   =========================== */

@media (max-width: 480px) {
  .floating-chat-input {
    bottom: 0.75rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  .floating-input-container {
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    gap: 0.4rem;
  }

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

/* ===========================
   12. TOUCH & CLICK INTERACTIONS
   =========================== */

/* Remove default tap highlight on mobile */
a,
button,
.card,
.service-card,
.example-card,
.value-card,
.blog-card,
.testimonial-card,
.why-item,
.path-card,
.trust-item,
.feature-item,
.social-btn,
.process-step,
.faq-list summary {
  -webkit-tap-highlight-color: transparent;
}

/* Active press-down state for all interactive cards */
.card:active,
.service-card:active,
.example-card:active,
.value-card:active,
.blog-card:active,
.testimonial-card:active,
.why-item:active,
.path-card:active,
.trust-item:active,
.feature-item:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* Active press-down for social & misc interactive elements */
.social-btn:active {
  transform: translateY(0) scale(0.96);
  transition-duration: 0.1s;
}

.process-step:active .process-number {
  border-color: var(--purple);
  background: var(--purple-light);
  transition-duration: 0.1s;
}

.faq-list summary:active {
  background: var(--bg-subtle);
  transition-duration: 0.1s;
}

/* Footer links active state */
.footer-links a:active {
  color: var(--purple);
  transition-duration: 0.1s;
}

/* ===========================
   13. REDUCED MOTION
   =========================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }

  .mobile-nav-content a,
  .mobile-nav-content .lang-switch {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .chat-side-panel,
  .floating-chat-input,
  .chat-side-panel-message,
  .mobile-nav-overlay {
    transition: none;
    animation: none;
  }

  /* Disable hover/active transforms */
  .card, .service-card, .example-card, .value-card,
  .blog-card, .testimonial-card, .why-item, .path-card,
  .trust-item, .feature-item, .btn, .social-btn {
    transition: none;
  }
}
