/* =============================================
   AI CAPABILITIES CARDS — Component Styles
   ============================================= */

/* --- Section Layout --- */
.ai-cards-section {
  padding: 100px 0;
  background: #f8f6f2;
  position: relative;
  overflow: hidden;
}

.ai-cards-header {
  text-align: center;
  margin-bottom: 60px;
}

.ai-cards-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50px;
  background: rgba(0, 70, 67, 0.08);
  border: 1px solid rgba(0, 70, 67, 0.15);
  color: #004643;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.ai-cards-badge i {
  font-size: 14px;
  color: #00897b;
}

.ai-cards-title {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.2;
}

.ai-cards-subtitle {
  font-size: 17px;
  color: #666;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Card Grid --- */
.ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* --- Individual Card --- */
.ai-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 70, 67, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease;
  cursor: pointer;
  position: relative;
}

.ai-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0, 70, 67, 0.12);
  border-color: #00897b;
}

/* --- Card Mockup Visual --- */
.ai-card-visual {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Gradient backgrounds per card ---- */
.ai-card-visual--chat {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}
.ai-card-visual--document {
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
}
.ai-card-visual--ocr {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}
.ai-card-visual--workflow {
  background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}
.ai-card-visual--decision {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}
.ai-card-visual--chatbot {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

/* ================================================
   MOCKUP 1: Conversational AI — Chat Bubbles
   ================================================ */
.mock-chat {
  width: 100%;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  max-width: 85%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mock-chat-bubble--user {
  background: #004643;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.mock-chat-bubble--ai {
  background: #fff;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.mock-chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mock-chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00897b;
  animation: aiTypingBounce 1.4s ease-in-out infinite;
}

.mock-chat-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.mock-chat-dot:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* ================================================
   MOCKUP 2: Document AI — Extracted Fields
   ================================================ */
.mock-doc {
  width: 100%;
  max-width: 220px;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-family: "Inter", sans-serif;
}

.mock-doc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.mock-doc-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 70, 67, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #004643;
}

.mock-doc-label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.mock-doc-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 11px;
}

.mock-doc-field-name {
  color: #888;
}

.mock-doc-field-check {
  color: #00897b;
  font-weight: 700;
  font-size: 12px;
}

.mock-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 137, 123, 0.1);
  color: #00897b;
  font-size: 10px;
  font-weight: 600;
}

.mock-doc-badge i {
  font-size: 9px;
}

/* ================================================
   MOCKUP 3: Intelligent OCR — Receipt Scanner
   ================================================ */
.mock-ocr {
  width: 100%;
  max-width: 210px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-family: "Inter", sans-serif;
}

.mock-ocr-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  font-size: 11px;
  color: #444;
}

.mock-ocr-line--highlight {
  background: rgba(0, 137, 123, 0.08);
  border: 1px dashed rgba(0, 137, 123, 0.3);
}

.mock-ocr-line-val {
  font-weight: 600;
  color: #1a1a1a;
}

.mock-ocr-divider {
  border: none;
  border-top: 1px dashed #ddd;
  margin: 8px 0;
}

.mock-ocr-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #00897b;
}

.mock-ocr-status i {
  font-size: 10px;
}

/* ================================================
   MOCKUP 4: Workflow Automation — Flow Diagram
   ================================================ */
.mock-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.mock-flow-node {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  color: #333;
  white-space: nowrap;
}

.mock-flow-node--active {
  background: #004643;
  color: #fff;
}

.mock-flow-arrow {
  font-size: 14px;
  color: #00897b;
  font-weight: 700;
}

/* ================================================
   MOCKUP 5: Decision Intelligence — Mini Chart
   ================================================ */
.mock-chart {
  width: 100%;
  max-width: 240px;
  text-align: center;
  font-family: "Inter", sans-serif;
}

.mock-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 100px;
  margin-bottom: 12px;
}

.mock-chart-bar {
  width: 24px;
  border-radius: 6px 6px 2px 2px;
  background: rgba(0, 70, 67, 0.15);
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mock-chart-bar--accent {
  background: linear-gradient(180deg, #00897b, #004643);
}

.mock-chart-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: #004643;
}

.mock-chart-badge i {
  color: #00897b;
  font-size: 11px;
}

/* ================================================
   MOCKUP 6: AI Chatbots — Floating Widget
   ================================================ */
.mock-widget {
  width: 100%;
  max-width: 220px;
  font-family: "Inter", sans-serif;
  position: relative;
}

.mock-widget-window {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.mock-widget-header {
  background: #004643;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-widget-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #00897b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

.mock-widget-header-text {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.mock-widget-online {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  font-weight: 400;
}

.mock-widget-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-widget-msg {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
}

.mock-widget-msg--bot {
  background: #f0f4f3;
  color: #333;
  align-self: flex-start;
  max-width: 85%;
}

.mock-widget-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #eee;
  font-size: 11px;
  color: #999;
}

.mock-widget-input i {
  color: #00897b;
  font-size: 14px;
}

/* ---- Hover glow effect on card visuals ---- */
.ai-card:hover .ai-card-visual {
  box-shadow: inset 0 0 30px rgba(0, 137, 123, 0.06);
}

/* --- Card Content --- */
.ai-card-content {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0; /* Prevent flex items from overflowing */
}

.ai-card-title {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ai-card-description {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 5.6em; /* Fallback for browsers that don't support line-clamp */
}

/* --- Card Arrow --- */
.ai-card-arrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #004643;
  transition:
    gap 0.3s ease,
    color 0.3s ease;
}

.ai-card-arrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 70, 67, 0.06);
  transition:
    background 0.3s ease,
    transform 0.3s ease;
  font-size: 14px;
}

.ai-card:hover .ai-card-arrow {
  color: #00897b;
}

.ai-card:hover .ai-card-arrow-icon {
  background: #004643;
  color: #fff;
  transform: translateX(4px);
}

/* --- Green top accent line on hover --- */
.ai-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #004643, #00897b);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.ai-card:hover::before {
  transform: scaleX(1);
}

/* --- Scroll Reveal Support --- */
.ai-card.ai-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-card.ai-reveal.ai-visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-card.ai-reveal.ai-visible:hover {
  transform: translateY(-8px);
}

/* --- Responsive Breakpoints --- */

/* Large Desktop: 3 columns */
@media screen and (min-width: 1200px) {
  .ai-cards-grid {
    gap: 32px;
  }
  
  .ai-card-content {
    padding: 32px 28px;
  }
  
  .ai-card-title {
    font-size: 22px;
  }
  
  .ai-card-description {
    font-size: 15px;
  }
}

/* Desktop: 3 columns */
@media screen and (max-width: 1199px) and (min-width: 992px) {
  .ai-cards-grid {
    gap: 28px;
  }
}

/* Tablet: 2 columns */
@media screen and (max-width: 991px) and (min-width: 768px) {
  .ai-cards-section {
    padding: 80px 0;
  }

  .ai-cards-header {
    margin-bottom: 50px;
  }

  .ai-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .ai-card-visual {
    height: 200px;
    padding: 20px;
  }

  .ai-card-content {
    padding: 24px 20px;
  }
  
  .ai-card-title {
    font-size: 18px;
  }
  
  .ai-card-description {
    font-size: 13px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: 3.9em; /* 3 lines * 1.3 line-height */
  }
}

/* Mobile: 1 column */
@media screen and (max-width: 767px) {
  .ai-cards-section {
    padding: 60px 0;
  }

  .ai-cards-header {
    margin-bottom: 40px;
  }

  .ai-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ai-card-visual {
    height: 180px;
    padding: 16px;
  }

  .ai-card-content {
    padding: 20px 16px;
  }
  
  .ai-card-title {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .ai-card-description {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: 4.8em; /* 3 lines * 1.6 line-height */
  }
  
  .ai-card-arrow {
    font-size: 13px;
    gap: 6px;
  }
  
  .ai-card-arrow-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* Small Mobile: 1 column with tighter spacing */
@media screen and (max-width: 479px) {
  .ai-cards-section {
    padding: 50px 0;
  }

  .ai-cards-title {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .ai-cards-subtitle {
    font-size: 15px;
    line-height: 1.6;
  }

  .ai-cards-grid {
    gap: 16px;
  }

  .ai-card-visual {
    height: 160px;
    padding: 12px;
  }

  .ai-card-content {
    padding: 16px 12px;
  }
  
  .ai-card-title {
    font-size: 16px;
    margin-bottom: 4px;
  }
  
  .ai-card-description {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 3em; /* 2 lines * 1.5 line-height */
  }
  
  .ai-card-arrow {
    font-size: 12px;
    gap: 4px;
  }
  
  .ai-card-arrow-icon {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  
  /* Fix mock elements for small screens */
  .mock-flow {
    gap: 2px;
  }

  .mock-flow-node {
    padding: 4px 6px;
    font-size: 9px;
  }
  
  .mock-chat-bubble {
    font-size: 10px;
    padding: 6px 10px;
  }
  
  .mock-doc-field {
    font-size: 10px;
  }
  
  .mock-widget-msg {
    font-size: 10px;
    padding: 6px 10px;
  }
}
