@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@300;400;600;700&display=swap');

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

body {
  font-family: 'Noto Sans Hebrew', sans-serif;
  direction: rtl;
  line-height: 1.7;
  color: #1a1a1a;
  background: #ffffff;
  font-weight: 300;
  font-size: 18px;
}

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

.hero .container {
  max-width: 1600px;
}

section {
  padding: 60px 0;
}

h1, h2, h3 {
  font-weight: 400;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  line-height: 1.15;
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.3rem;
}

/* Hero Section */
.hero {
  background: #f8f8f8;
  color: #1a1a1a;
  text-align: center;
  padding: 40px 0;
  min-height: 500px;
  display: flex;
  align-items: center;
}

.hero-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Site logo in hero - match the hero video height while preserving aspect ratio */
.site-logo {
  display: block;
  margin: 0 auto;
  width: auto;                 /* let width adapt to preserve aspect */
  height: auto;
  max-height: 350px;           /* match .hero-video max-height on desktop */
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.10));
  border-radius: 10px; /* keep gentle rounding to match hero card */
  max-width: 100%; /* prevent overflow in narrow containers */
}

/* ensure logo height reduces on smaller screens to match video breakpoint */
@media (max-width: 768px) {
  .site-logo {
    max-height: 260px; /* match mobile .hero-video max-height */
    width: auto;
  }
}

/* Hero media layout: logo 30% / video 70% side-by-side */
.hero-media {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 2rem;
}

.logo-wrapper {
  flex: 0 0 30%;
  max-width: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.video-wrapper {
  flex: 0 0 70%;
  max-width: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ensure video fills its wrapper nicely */
.video-wrapper .hero-video {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 14px 50px rgba(0,0,0,0.12);
  border: 2px solid #e0e0e0;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 768px) {
  .hero-media {
    flex-direction: column;
    gap: 14px;
  }
  .logo-wrapper, .video-wrapper {
    max-width: 100%;
    flex: 0 0 auto;
  }
  .video-wrapper .hero-video {
    max-height: 260px;
  }
}

.hero-video {
  width: 100%;
  max-width: 860px;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 14px 50px rgba(0,0,0,0.12);
  border: 2px solid #e0e0e0;
  display: block;
}

@media (max-width: 768px) {
  .hero-video {
    max-width: 100%;
  }
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.95;
  font-weight: 400;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  background: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 400;
  font-size: 1.1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 2rem;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  background: #1e7a34;
}

/* Replaced "For Who" with compact AI Samples grid */
.ai-samples {
  background: #f8f8f8;
  padding: 40px 0;
}

.ai-samples h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

/* 3-column samples grid (desktop), 1-column mobile */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1.5rem;
}

/* Sample card */
.sample-card {
  background: white;
  border-radius: 1rem;
  padding: 22px;
  text-align: right;
  box-shadow: 0 8px 26px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #eef2f6;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: default;
}

.sample-card:focus,
.sample-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(20,40,80,0.08);
  outline: none;
}

/* Icon circle (enlarged so the glyph/icon stands out) */
.sample-icon {
  width: 110px;
  height: 110px;
  min-width: 110px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#5b8cff,#2c5aa0);
  box-shadow: 0 12px 30px rgba(0,0,0,0.10);
  color: white;
  flex-shrink: 0;
  font-size: 36px; /* larger emoji/icon scale */
}

/* Ensure inline SVGs inside sample-icon scale up */
.sample-icon svg {
  width: 56px;
  height: 56px;
  display: block;
}

/* Ensure inline emoji/div icons inside sample-icon respect the larger font-size and are centered */
.sample-icon > div {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

/* Waving hand for clickable sample cards (attention) */
.sample-card.clickable-agent {
  cursor: pointer;
  position: relative;
}

.sample-card.clickable-agent:after {
  content: "👋";
  position: absolute;
  top: -10px;
  left: 50%; /* centered horizontally above the card */
  transform: translateX(-50%);
  font-size: 22px;
  transform-origin: 50% 70%;
  animation: wave 1.6s infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
  z-index: 6;
  pointer-events: none;
}

/* slightly scale up icon on hover/focus for clarity */
.sample-card.clickable-agent:focus .sample-icon,
.sample-card.clickable-agent:hover .sample-icon {
  transform: translateY(-4px) scale(1.03);
  transition: transform 0.18s;
}

/* give each sample a different accent via nth-child - expanded to 9 unique colorful accents */
.samples-grid .sample-card:nth-child(1) .sample-icon { background: linear-gradient(135deg,#5b8cff,#2c5aa0); } /* blue */
.samples-grid .sample-card:nth-child(2) .sample-icon { background: linear-gradient(135deg,#ff8a65,#ff6b35); } /* orange (match support agent) */
.samples-grid .sample-card:nth-child(3) .sample-icon { background: linear-gradient(135deg,#ffd166,#ff9f1c); color:#111; } /* yellow */
.samples-grid .sample-card:nth-child(4) .sample-icon { background: linear-gradient(135deg,#ff8a65,#ff6b35); } /* orange (chat/engagement) */
.samples-grid .sample-card:nth-child(5) .sample-icon { background: linear-gradient(135deg,#ff6bcb,#dd2a7b); } /* pink/magenta */
.samples-grid .sample-card:nth-child(6) .sample-icon { background: linear-gradient(135deg,#7ac7ff,#2b9cff); } /* light blue/cyan */
.samples-grid .sample-card:nth-child(7) .sample-icon { background: linear-gradient(135deg,#a78bfa,#6b46c1); } /* purple */
/* changed: make the "אוטומציה בהתאמה אישית" icon darker and more contrasting so it doesn't blend into the page background */
.samples-grid .sample-card:nth-child(8) .sample-icon { background: linear-gradient(135deg,#2c5aa0,#1e7a34); color:#ffffff; box-shadow: 0 12px 32px rgba(30,60,110,0.14); } /* distinct blue/green */
.samples-grid .sample-card:nth-child(9) .sample-icon { background: linear-gradient(135deg,#4cd3ff,#1bb0ff); } /* bright cyan */

.sample-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.sample-card p {
  margin: 0;
  color: #555;
  font-size: 0.98rem;
  line-height: 1.35;
}

/* Responsive: single column on small screens */
@media (max-width: 768px) {
  .samples-grid { grid-template-columns: 1fr; }
  .sample-card { padding: 16px; gap: 12px; }
  .sample-icon { width: 88px; height: 88px; min-width:88px; font-size:30px; border-radius:14px; }
  .sample-icon svg { width:44px; height:44px; }
  .sample-icon > div { font-size:30px; }
}

/* Process Section */
.process {
  background: white;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 3rem;
}

.step {
  text-align: center;
  padding: 20px;
}

.step-number {
  width: 60px;
  height: 60px;
  background: #2c5aa0;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 auto 1.5rem;
}

.step h3 {
  margin-bottom: 0.8rem;
}

.step p {
  color: #666;
}

/* Pricing Section */
.pricing {
  background: #f8f8f8;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 2rem;
}

.pricing-card {
  background: white;
  padding: 35px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #e0e0e0;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pricing-card.featured {
  border-color: #2c5aa0;
  transform: scale(1.05);
}

.pricing-card.featured:hover {
  transform: scale(1.08) translateY(-5px);
}

.badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: #2c5aa0;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 400;
}

.pricing-card h3 {
  margin-bottom: 1rem;
}

.price {
  font-size: 2rem;
  font-weight: 400;
  margin: 1.5rem 0;
}

.pricing-card ul {
  list-style: none;
  text-align: right;
  margin-top: 1.5rem;
}

.pricing-card li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.pricing-card li:last-child {
  border-bottom: none;
}

.pricing-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
  color: #666;
}

/* AI Gallery Section */
.ai-gallery {
  background: white;
  padding: 60px 0;
}

.ai-gallery h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

/* Grid: 3 columns desktop, 1 column mobile; RTL-safe */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 1.5rem;
  direction: rtl;
}

/* Card */
.ai-card {
  background: white;
  border-radius: 1rem; /* rounded-2xl feel */
  padding: 28px;
  text-align: right;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1), box-shadow 0.22s;
  border: 1px solid #f0f0f2;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 170px;
}

/* Hover / focus lift for premium feel */
.ai-card:hover,
.ai-card:focus {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(20,40,80,0.12);
  outline: none;
}

/* Large colorful icon (increased so AI cards' icons are more prominent) */
.ai-icon {
  width: 120px; /* larger icon */
  height: 120px;
  font-size: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  flex-shrink: 0;
  color: white;
  background: linear-gradient(135deg, #2c5aa0 0%, #1e7a34 100%);
  box-shadow: 0 12px 36px rgba(0,0,0,0.10);
}

/* Make icons individually colorful via nth-child for visual variety */
.ai-grid .ai-card:nth-child(1) .ai-icon { background: linear-gradient(135deg,#5b8cff,#2c5aa0); }
.ai-grid .ai-card:nth-child(2) .ai-icon { background: linear-gradient(135deg,#ff8a65,#ff6b35); }
.ai-grid .ai-card:nth-child(3) .ai-icon { background: linear-gradient(135deg,#ffd166,#ff9f1c); color:#111; }
.ai-grid .ai-card:nth-child(4) .ai-icon { background: linear-gradient(135deg,#8be9a8,#28a745); }
.ai-grid .ai-card:nth-child(5) .ai-icon { background: linear-gradient(135deg,#ff6bcb,#dd2a7b); }
.ai-grid .ai-card:nth-child(6) .ai-icon { background: linear-gradient(135deg,#7ac7ff,#2b9cff); }
.ai-grid .ai-card:nth-child(7) .ai-icon { background: linear-gradient(135deg,#a78bfa,#6b46c1); }
.ai-grid .ai-card:nth-child(8) .ai-icon { background: linear-gradient(135deg,#ffd6a5,#ffb494); color:#111; }

.ai-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.ai-card p {
  margin: 0;
  color: #555;
  font-size: 0.98rem;
  line-height: 1.4;
  margin-top: 6px;
}

/* Responsive: single column on small screens */
@media (max-width: 768px) {
  .ai-grid {
    grid-template-columns: 1fr;
  }

  .ai-card {
    min-height: auto;
    padding: 20px;
  }

  .ai-icon {
    width: 96px;
    height: 96px;
    font-size: 44px;
  }
}

/* Solution Section */
.solution {
  background: #f8f8f8;
}

.solution-points {
  margin: 2rem auto 0;
}

.point {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
}

.checkmark {
  color: #28a745;
  font-size: 1.5rem;
  font-weight: 400;
  flex-shrink: 0;
}

.point p {
  font-size: 1.1rem;
}

/* Contact Section */
.contact {
  background: linear-gradient(135deg, #28a745 0%, #1e7a34 100%);
  color: white;
  text-align: center;
  padding: 80px 0;
}

.contact h2 {
  color: white;
}

.contact-text {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.contact-methods {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  background: white;
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 400;
  font-size: 1.1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.contact-button.whatsapp {
  background: #25D366;
  color: white;
}

.contact-button.whatsapp:hover {
  background: #20ba5a;
}

.contact-button.calendar {
  background: #ff6b35;
  color: white;
}

.contact-button.calendar:hover {
  background: #e55a2b;
}

.contact-button.phone {
  background: #007bff;
  color: white;
}

.contact-button.phone:hover {
  background: #0056b3;
}

/* Contact Form */
.contact-form-wrapper {
  margin: 50px auto 0;
  text-align: center;
}

.contact-form-wrapper h3 {
  color: white;
  margin-bottom: 2rem;
  font-size: 1.3rem;
}

.contact-form {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  font-family: 'Noto Sans Hebrew', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.submit-button {
  width: 100%;
  padding: 16px;
  background: white;
  color: #28a745;
  border: none;
  border-radius: 8px;
  font-family: 'Noto Sans Hebrew', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Audio Section */
.audio-section {
  background: white;
  padding: 60px 0;
}

.audio-wrapper {
  margin: 2rem auto 0;
}

/* Footer */
footer {
  background: #1e3a6b;
  color: white;
  text-align: center;
  padding: 30px 0;
}

footer p {
  opacity: 0.8;
}

/* Footer social links */
.footer-inner {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.18s, transform 0.12s;
}

.social-links a:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-2px);
}

.social-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  filter: invert(1) hue-rotate(180deg) saturate(0.6);
}

/* Chat Widget Styles */
.chat-bubble {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg,#ff8a65,#ff6b35); /* main chat bubble -> orange */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.32);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
}

/* Tesla (center) variant placed between the two existing bubbles */
.chat-bubble.tesla {
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  bottom: 22px;
  background: linear-gradient(135deg,#111111 0%, #e82127 100%); /* dark-to-tesla-red */
  width: 76px;
  height: 76px;
  box-shadow: 0 10px 28px rgba(232,33,39,0.18);
}

/* Support (left) variant for sticky support agent - distinct blue gradient so robots differ */
.chat-bubble.support {
  right: auto;
  left: 22px;
  background: linear-gradient(135deg,#5b8cff 0%, #2c5aa0 100%); /* blue gradient */
}

/* Support widget position/variant */
.chat-widget.support {
  right: auto;
  left: 24px;
  border-color: #2c5aa0; /* match blue support accent */
}

/* Tesla widget styling */
.chat-widget.tesla {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  border-color: #e82127;
}

.chat-widget.tesla .chat-header {
  background: linear-gradient(135deg,#111111,#e82127);
}

/* Ensure tooltip arrow for left bubble points correctly */
.chat-bubble.support .chat-bubble-tooltip {
  right: auto;
  left: 0;
  bottom: 70px;
}


.chat-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Waving hand indicator on chat bubbles (attention)
   Disabled for chat-bubbles to remove the hand from bottom agents.
   Sample-card waving hand remains untouched. */
.chat-bubble::after,
.chat-bubble.support::after {
  display: none;
}

/* subtle entrance move so it feels attention-grabbing but not annoying */
@keyframes wave {
  0% { transform: rotate(0deg) translateY(0); opacity: 0; }
  8% { opacity: 1; }
  12% { transform: rotate(14deg) translateY(-2px); }
  24% { transform: rotate(-10deg) translateY(0); }
  36% { transform: rotate(8deg) translateY(-1px); }
  48% { transform: rotate(-6deg) translateY(0); }
  60% { transform: rotate(4deg) translateY(-1px); }
  72% { transform: rotate(-2deg) translateY(0); }
  100% { transform: rotate(0deg) translateY(0); opacity: 1; }
}

.chat-bubble-tooltip {
  position: absolute;
  bottom: 84px;
  right: 0;
  background: #2c5aa0; /* site blue */
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 14px 40px rgba(12,34,80,0.35);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateY(0);
  direction: rtl;
  border: 1px solid rgba(255,255,255,0.06);
  display: block; /* visible by default (desktop) */
  z-index: 1100; /* ensure it sits above other elements */
}

/* Tooltip arrow */
.chat-bubble-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #2c5aa0; /* match tooltip */
  transform: rotate(45deg);
  border-right: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Show tooltips only on small screens (mobile) */
@media (max-width: 768px) {
  .chat-bubble-tooltip {
    display: none; /* hide tooltips on mobile */
    bottom: 80px; /* slight offset for mobile layout */
    right: 0;
    font-size: 13px;
    padding: 8px 12px;
  }
}

.chat-widget {
  position: fixed;
  bottom: 86px; /* moved slightly up so it doesn't collide with OS UI */
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  width: 460px;
  height: 520px; /* reduced height to show more content above input and avoid full-focus overlap */
  background: white;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.34);
  display: none;
  flex-direction: column;
  z-index: 999;
  border: 2px solid #e55a2b; /* match orange chat styling */
}

.chat-widget.open {
  display: flex;
}

.chat-header {
  background: linear-gradient(135deg,#ff8a65,#ff6b35); /* main chat header -> orange */
  padding: 15px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.chat-logo {
  width: 100%;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: white;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  pointer-events: none; /* allow interactive elements inside header to receive clicks */
}

/* Ensure any interactive link/button placed inside .chat-header sits above the centered logo */
.chat-header a,
.chat-header button,
.chat-header [role="button"] {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.close-chat {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
  transition: opacity 0.2s;
}

.close-chat:hover {
  opacity: 0.8;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px; /* reduced padding to tighten space between messages and input */
  padding-bottom: 8px; /* ensure less gap below messages */
  background: #f8f8f8;
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-message,
.user-message {
  margin-bottom: 15px;
  display: flex;
  direction: rtl;
}

.user-message {
  justify-content: flex-start;
}

.bot-message {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  direction: rtl;
  text-align: right;
}

.message-bubble.bot {
  background: #2c5aa0;
  color: white;
  border-bottom-right-radius: 4px;

  /* stronger dark-blue frame to improve contrast and readability */
  border: 4px solid #0A3B7A;
  box-shadow: 0 14px 36px rgba(10,59,122,0.18), 0 3px 8px rgba(30,50,90,0.06);
  padding: 12px 18px; /* slightly more inner space to balance thicker border */
  position: relative;
  z-index: 3; /* ensure bubble sits above any overlapping elements */
}

/* ensure typing indicator keeps same visual with outline */
.bot-message.typing-message .typing-indicator {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(44,90,160,0.12);
}

.message-bubble.user {
  background: white;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
  border: 1px solid #e0e0e0;
}

.chat-input-wrapper {
  display: flex;
  padding: 15px;
  background: white;
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 10px 10px;
  direction: rtl;
}

.chat-input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 10px 15px;
  font-family: 'Noto Sans Hebrew', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  direction: rtl;
  text-align: right;
}

.chat-input:focus {
  border-color: #2c5aa0;
}

.send-button {
  background: #2c5aa0;
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.send-button:hover {
  background: #1e3a6b;
}

.send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: #2c5aa0;
  border-radius: 12px;
  width: fit-content;
  margin-right: auto;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@media (max-width: 768px) {
  /* Make the chat window shorter and tighter on mobile so header/question are visible */
  .chat-widget {
    width: calc(100vw - 40px);
    /* further reduce height so input remains visible above mobile keyboards */
    height: calc(100vh - 300px);
    bottom: 100px;
    right: 20px;
    left: 20px;
  }

  /* Slightly smaller chat bubble on mobile */
  .chat-bubble {
    bottom: 18px;
    right: 18px;
    width: 60px;
    height: 60px;
  }

  /* Tighter header and smaller logo so title/question fit */
  .chat-header {
    padding: 10px;
  }
  .chat-logo {
    font-size: 16px;
    top: 50%;
    transform: translateY(-50%);
  }
  .close-chat {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  /* Reduce message padding and font-size so more content fits in view */
  .chat-messages {
    padding: 12px;
  }
  .message-bubble {
    font-size: 13px;
    max-width: 80%;
    padding: 10px 12px;
  }

  /* Compact input area */
  .chat-input-wrapper {
    padding: 10px;
  }
  .chat-input {
    font-size: 13px;
    padding: 8px 12px;
  }
  .send-button {
    width: 36px;
    height: 36px;
    margin-right: 8px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .hero {
    padding: 30px 0;
    min-height: 420px;
  }

  .hero-content {
    padding: 25px;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  section {
    padding: 40px 0;
  }
  
  .cards, .timeline, .pricing-cards {
    grid-template-columns: 1fr;
  }
  
  .pricing-card.featured {
    transform: scale(1);
  }
  
  .pricing-card.featured:hover {
    transform: translateY(-5px);
  }
  
  .contact-methods {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-button {
    width: 100%;
    max-width: 300px;
  }
  
  .contact-form {
    padding: 20px;
  }
  
  .contact-form-wrapper h3 {
    font-size: 1.1rem;
  }

  /* Remove waving hand from clickable sample cards on mobile only */
  .sample-card.clickable-agent::after {
    display: none;
  }
}