/* ===== Base & Variables ===== */
:root {
  --primary: #0b7a3e;
  --primary-light: #e8f5ee;
  --accent: #d9534f;
  --accent-dark: #c9302c;
  --dark: #1a1a2e;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-600: #6c757d;
  --white: #ffffff;
  --bubble-agent: #e8f5ee;
  --bubble-user: #f0f0f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  color: #333;
  background: var(--gray-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 20px 40px;
}

.hero .urgency-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}

.hero .urgency-badge .deadline-date {
  text-decoration: underline;
}

.hero h1 {
  font-size: 24px;
  line-height: 1.35;
  max-width: 600px;
  margin: 0 auto 16px;
  font-weight: 700;
}

.hero .agent-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

.hero .agent-online .pulse-dot {
  width: 10px;
  height: 10px;
  background: #2ecc71;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ===== Chat Container ===== */
.chat-wrapper {
  max-width: 480px;
  margin: -20px auto 0;
  padding: 0 16px 32px;
  position: relative;
  z-index: 1;
}

.chat-container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px 16px;
  min-height: 300px;
}

/* ===== Chat Rows ===== */
.chat-row {
  display: flex;
  margin-bottom: 12px;
  align-items: flex-end;
}

.chat-row.agent { justify-content: flex-start; }
.chat-row.user { justify-content: flex-end; }

.chat-row .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.chat-row.agent .avatar { margin-right: 8px; }
.chat-row.user .avatar { margin-left: 8px; }

/* ===== Message Bubbles ===== */
.bubble-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 80%;
}

.bubble {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.45;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.chat-row.agent .bubble {
  background: var(--bubble-agent);
  color: #1a1a1a;
}

.chat-row.user .bubble {
  background: var(--bubble-user);
  color: #333;
  border: 1px solid var(--gray-200);
  text-align: center;
  min-width: 50px;
  margin-left: auto;
}

/* ===== Typing Animation ===== */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 10px 18px;
  background: var(--bubble-agent);
  border-radius: var(--radius-sm);
  width: fit-content;
  order: 999;
}

.typing-indicator .dot {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-indicator .dot:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ===== Chat Buttons ===== */
.chat-btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin: 2px 4px;
  font-family: 'Open Sans', sans-serif;
}

.chat-btn:hover {
  background: #096631;
  transform: translateY(-1px);
}

.chat-btn:active { transform: translateY(0); }

/* ===== Phone CTA ===== */
.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(11,122,62,0.3);
}

.phone-cta:hover {
  background: #096631;
  color: var(--white);
  transform: translateY(-1px);
}

.phone-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ===== Hidden utility ===== */
.hidden { display: none !important; }

/* ===== Footer ===== */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 40px 20px 20px;
  font-size: 12px;
  line-height: 1.7;
}

.site-footer .footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.site-footer p {
  margin-bottom: 14px;
}

.site-footer strong {
  color: rgba(255,255,255,0.9);
}

.site-footer a {
  color: #6ec1e4;
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 24px;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.footer-bottom .copyright {
  font-size: 12px;
}

.footer-bottom .legal-links {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

/* ===== Scroll-to-top ===== */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  box-shadow: var(--shadow-md);
  font-size: 20px;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
  .hero { padding: 36px 16px 32px; }
  .hero h1 { font-size: 20px; }
  .chat-wrapper { padding: 0 10px 24px; }
  .chat-container { padding: 16px 12px; }
  .bubble { font-size: 13.5px; }
  .bubble-group { max-width: 85%; }
}

@media (min-width: 768px) {
  .hero { padding: 56px 24px 48px; }
  .hero h1 { font-size: 28px; }
  .chat-wrapper { margin-top: -24px; }
}
