/* ----------------------------------------------------
   Design Tokens & CSS Variables (Premium Light Green)
   ---------------------------------------------------- */
:root {
  --primary-font: 'Inter', sans-serif;
  --heading-font: 'Outfit', sans-serif;

  /* Premium Light Emerald Green Palette */
  --bg-color: #f8fafc;
  --accent-glow: hsl(164, 87%, 18%);
  /* Vibrant Emerald Green */
  --accent-glow-hover: hsl(164, 73%, 16%);
  --secondary-accent: hsl(161, 91%, 13%);
  /* Forest Teal Green */

  /* Widget styles (Light Mode Premium Glassmorphism) */
  --glass-bg: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 16px 36px rgba(16, 185, 129, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);

  /* Text colors (High Contrast Slate) */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inv: #ffffff;
}

/* ----------------------------------------------------
   General Page Styling
   ---------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--primary-font);
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ----------------------------------------------------
   Hero / Landing Section Layout (Matching Light Theme)
   ---------------------------------------------------- */
.hero-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
    #f8fafc;
  padding: 24px 8%;
  position: relative;
}

/* Navigation bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.brand-icon {
  font-size: 1.8rem;
  color: var(--accent-glow);
  background: linear-gradient(135deg, var(--accent-glow), var(--secondary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-name {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.brand-badge {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #047857;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.visit-btn {
  text-decoration: none;
  color: #334155;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.visit-btn:hover {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Hero Content */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 720px;
  padding: 80px 0;
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 2s infinite;
}

.hero-title {
  font-family: var(--heading-font);
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: #0f172a;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-glow), var(--secondary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

.btn-primary-custom {
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-glow), #059669);
  color: var(--text-inv);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
  transition: all 0.25s ease;
}

.btn-primary-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4);
}

/* ----------------------------------------------------
   Jobs Section & Cards
   ---------------------------------------------------- */
.jobs-section {
  padding: 100px 8%;
  background-color: #ffffff;
}

.section-title {
  font-family: var(--heading-font);
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  letter-spacing: -1px;
  color: #0f172a;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.job-card {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.job-card:hover {
  transform: translateY(-8px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.05);
  background: #ffffff;
}

.job-card-header {
  margin-bottom: 20px;
}

.job-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.job-title {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.job-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.job-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.job-meta i {
  color: var(--accent-glow);
  margin-right: 6px;
}

.btn-apply-card {
  text-decoration: none;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #334155;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.job-card:hover .btn-apply-card {
  background: var(--accent-glow);
  border-color: var(--accent-glow);
  color: var(--text-inv);
}

/* ----------------------------------------------------
   Footer styling
   ---------------------------------------------------- */
.footer {
  padding: 40px 8%;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #f1f5f9;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

/* ----------------------------------------------------
   Floating Toggle Button
   ---------------------------------------------------- */
.chat-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-glow), #10b981);
  border: none;
  color: var(--text-inv);
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  z-index: 2050;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-toggle-btn:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.5);
}

.chat-toggle-btn i {
  position: absolute;
  transition: transform 0.3s, opacity 0.3s;
}

.chat-toggle-btn .toggle-icon-open {
  opacity: 1;
  transform: rotate(0);
}

.chat-toggle-btn .toggle-icon-close {
  opacity: 0;
  transform: rotate(-90deg);
}

/* When chat is open, swap icons */
.chat-toggle-btn.open .toggle-icon-open {
  opacity: 0;
  transform: rotate(90deg);
}

.chat-toggle-btn.open .toggle-icon-close {
  opacity: 1;
  transform: rotate(0);
}

/* ----------------------------------------------------
   Chat Widget Container (Premium Light Glassmorphism)
   ---------------------------------------------------- */
.chat-widget {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 330px;
  height: 480px;
  max-height: calc(100vh - 130px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2040;
  animation: slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  overscroll-behavior: contain;
}

.chat-widget.hidden {
  display: none !important;
}

/* Header styling */
.chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--accent-glow), var(--secondary-accent));
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-inv);
  touch-action: none;
}

.bot-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-avatar-container {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.bot-avatar-icon {
  font-size: 1.1rem;
  color: var(--text-inv);
}

.bot-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: white;
}

.online-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #ffffff;
}

.bot-text-info {
  display: flex;
  flex-direction: column;
}

.bot-name {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-inv);
}

.bot-status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.chat-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-close:hover {
  color: var(--text-inv);
  background: rgba(255, 255, 255, 0.15);
}

.chat-body {
  flex: 1;
  min-height: 0; /* Prevents overflow pushing input area off-screen on mobile */
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.5) 0%, #ffffff 100%);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.chat-body::-webkit-scrollbar {
  width: 5px;
}

.chat-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

/* Message Bubbles layout */
.chat-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  animation: scale-up-msg 0.25s ease both;
  word-break: break-word;
  overflow-wrap: break-word;
}

.chat-message a {
  word-break: break-all;
  overflow-wrap: break-word;
}

/* User Message Bubble */
.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-glow), var(--secondary-accent));
  color: var(--text-inv);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Bot Message Bubble */
.chat-message.bot {
  align-self: flex-start;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

/* Simple Markdown styles in bubbles */
.chat-message.bot strong {
  color: #0f172a;
  font-weight: 700;
}

.chat-message.bot ul {
  margin-top: 6px;
  margin-bottom: 6px;
  padding-left: 20px;
}

.chat-message.bot li {
  margin-bottom: 4px;
}

/* Suggestion Chips Section */
.suggestion-chips-container {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  overflow-x: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #ffffff;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior: contain;
}

.suggestion-chips-container::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #047857;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--accent-glow);
  border-color: var(--accent-glow);
  color: var(--text-inv);
  transform: translateY(-1px);
}

/* Typing Indicator Styling */
.typing-indicator-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 11px;
  color: var(--text-muted);
  background: #ffffff;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-muted);
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

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

/* Input bar panel */
.chat-input-panel {
  padding: 14px 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
  align-items: center;
  background: #ffffff;
  touch-action: none;
}

.chat-input-panel input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input-panel input:focus {
  border-color: rgba(16, 185, 129, 0.4);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-glow);
  border: none;
  color: var(--text-inv);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.chat-send-btn:hover {
  background: var(--accent-glow-hover);
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

/* ----------------------------------------------------
   Keyframes & Animations
   ---------------------------------------------------- */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.5;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scale-up-msg {
  from {
    transform: scale(0.96);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes typing-bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* ----------------------------------------------------
   Responsive Adjustments (Mobile friendly)
   ---------------------------------------------------- */
@media (max-width: 768px) {
  .hero-container {
    padding: 20px 5%;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .jobs-section {
    padding: 60px 5%;
  }
}

@media (max-width: 576px) {
  .chat-widget {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    width: calc(100% - 32px) !important;
    max-width: 340px !important;
    height: 330px !important;
    max-height: calc(100vh - 40px) !important;
    border-radius: 16px !important;
    border: 1px solid var(--glass-border);
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    animation: mobile-fade-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .chat-toggle-btn {
    bottom: 16px !important;
    right: 16px !important;
  }

  /* Hide the toggle button when open to save space and prevent overlapping input panel */
  .chat-toggle-btn.open {
    display: none !important;
  }

  /* Compact header on mobile */
  .chat-header {
    padding: 8px 12px !important;
  }
  .bot-avatar-container {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }
  .bot-name {
    font-size: 0.85rem !important;
  }
  .bot-status {
    font-size: 9px !important;
  }
  .chat-close {
    width: 26px !important;
    height: 26px !important;
    font-size: 1rem !important;
  }

  /* Compact body padding on mobile */
  .chat-body {
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  /* Smaller bot message bubble, smaller font, smaller padding */
  .chat-message {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    border-radius: 12px !important;
  }
  .chat-message.bot ul {
    padding-left: 14px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
  }
  .chat-message.bot li {
    margin-bottom: 2px !important;
  }

  /* Compact suggestion chips on mobile */
  .suggestion-chips-container {
    padding: 6px 12px !important;
  }
  .chip {
    padding: 5px 10px !important;
    font-size: 10px !important;
  }

  /* Compact input panel on mobile */
  .chat-input-panel {
    padding: 8px 12px !important;
    gap: 8px !important;
  }
  .chat-input-panel input {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
  }
  .chat-send-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
  }
}

/* ----------------------------------------------------
   Typewriter Blinking Cursor
   ---------------------------------------------------- */
.chat-typing-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  background-color: var(--accent-glow);
  margin-left: 3px;
  vertical-align: middle;
  animation: cursor-blink 0.6s step-end infinite;
}

@keyframes cursor-blink {

  from,
  to {
    background-color: transparent
  }

  50% {
    background-color: var(--accent-glow)
  }
}

/* Hide Webkit Search Input Cancel Button */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

/* Centered Mobile Fade-in Animation */
@keyframes mobile-fade-in {
  from {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Centered Mobile Fade-in Animation from Bottom */
@keyframes mobile-fade-in-bottom {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
