/* ===========================
   ai.css — AI Page Styles
   =========================== */

/* ============================
   1. AI HERO
   ============================ */
.ai-hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.ai-hero .hero-content h1 {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 20px;
}

.ai-hero .hero-content .subtitle {
  font-size: 1.15rem;
  color: var(--white-alpha-60);
  margin-bottom: 40px;
  line-height: 2;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================
   2. PAIN POINTS
   ============================ */
.ai-pain {
  background: var(--dark-3);
}

.ai-pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.ai-pain-card {
  padding: 28px;
  transition: var(--transition);
  border-top: 3px solid rgba(220, 53, 69, 0.6);
}

.ai-pain-card:hover {
  transform: translateY(-4px);
  border-top-color: rgba(220, 53, 69, 0.9);
}

.ai-pain-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(220, 53, 69, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ai-pain-icon svg {
  width: 26px;
  height: 26px;
  color: #dc3545;
}

.ai-pain-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ai-pain-card p {
  font-size: 0.9rem;
  color: var(--white-alpha-60);
  line-height: 1.8;
}

/* ============================
   3. FEATURES DEEP-DIVE (TABS)
   ============================ */
.ai-features {
  background: var(--dark-1);
}

.ai-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.ai-tab {
  padding: 10px 24px;
  border-radius: 50px;
  background: var(--white-alpha-05);
  border: 1px solid var(--white-alpha-10);
  color: var(--white-alpha-60);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ai-tab:hover {
  color: var(--gold-1);
  border-color: var(--gold-1);
}

.ai-tab.active {
  background: var(--gold-gradient);
  color: var(--dark-1);
  border-color: transparent;
}

.ai-panel {
  display: none;
}

.ai-panel.active {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 40px;
  align-items: start;
  animation: aiFadeIn 0.4s ease;
}

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

.ai-feature-detail h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.ai-feature-detail .en-badge {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--gold-1);
  margin-bottom: 20px;
  direction: ltr;
}

.ai-feature-detail > p {
  color: var(--white-alpha-60);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 2;
}

.ai-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.ai-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--white-alpha-80);
}

.ai-feature-list li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold-1);
}

.ai-spec-card {
  padding: 28px;
  border-radius: var(--radius);
}

.ai-spec-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--gold-1);
}

.ai-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--white-alpha-10);
}

.ai-spec-row:last-child {
  border-bottom: none;
}

.ai-spec-label {
  font-size: 0.9rem;
  color: var(--white-alpha-60);
}

.ai-spec-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-1);
  direction: ltr;
}

/* ============================
   4. CAPABILITIES GRID
   ============================ */
.ai-capabilities {
  background: var(--dark-3);
}

.ai-cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ai-cap-card {
  padding: 28px;
  text-align: center;
  transition: var(--transition);
}

.ai-cap-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 67, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.ai-cap-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(212, 168, 67, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: var(--transition);
}

.ai-cap-card:hover .ai-cap-icon {
  background: var(--gold-gradient);
}

.ai-cap-icon svg {
  width: 26px;
  height: 26px;
  color: var(--gold-1);
  transition: var(--transition);
}

.ai-cap-card:hover .ai-cap-icon svg {
  color: var(--dark-1);
}

.ai-cap-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ai-cap-card p {
  font-size: 0.85rem;
  color: var(--white-alpha-60);
  line-height: 1.7;
}

/* ============================
   5. BEFORE / AFTER
   ============================ */
.ai-before-after {
  background: var(--dark-1);
}

.ai-ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.ai-ba-card {
  padding: 32px;
}

.ai-ba-card--before {
  border-right: 4px solid #dc3545;
}

.ai-ba-card--after {
  border-right: 4px solid var(--gold-1);
}

.ai-ba-label {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.ai-ba-card--before .ai-ba-label {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
}

.ai-ba-card--after .ai-ba-label {
  background: rgba(212, 168, 67, 0.15);
  color: var(--gold-1);
}

.ai-ba-card ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--white-alpha-80);
  padding: 8px 0;
}

.ai-ba-card ul li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ai-ba-card--before ul li svg {
  color: #dc3545;
}

.ai-ba-card--after ul li svg {
  color: var(--gold-1);
}

.ai-ba-highlight {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.2);
}

.ai-ba-highlight p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-1);
  line-height: 2;
}

/* ============================
   6. ARCHITECTURE PIPELINE
   ============================ */
.ai-architecture {
  background: var(--dark-3);
}

.ai-pipeline {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  direction: rtl;
}

.ai-pipeline-step {
  flex: 1;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.ai-pipeline-step:hover {
  transform: translateY(-4px);
}

.ai-pipeline-step .step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--dark-1);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.ai-pipeline-step .step-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(212, 168, 67, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.ai-pipeline-step .step-icon svg {
  width: 24px;
  height: 24px;
  color: var(--gold-1);
}

.ai-pipeline-step h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ai-pipeline-step p {
  font-size: 0.82rem;
  color: var(--white-alpha-60);
  line-height: 1.7;
}

.ai-pipeline-arrow {
  display: flex;
  align-items: center;
  padding-top: 36px;
  color: var(--gold-1);
  font-size: 1.4rem;
  flex-shrink: 0;
  opacity: 0.5;
}

/* ============================
   7. TECH SPECS TABLE
   ============================ */
.ai-specs {
  background: var(--dark-1);
}

.ai-specs-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--white-alpha-10);
  -webkit-overflow-scrolling: touch;
}

.ai-specs-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.9rem;
}

.ai-specs-table thead th {
  background: rgba(212, 168, 67, 0.1);
  padding: 16px 14px;
  font-weight: 700;
  color: var(--gold-1);
  border-bottom: 2px solid var(--white-alpha-10);
  white-space: nowrap;
}

.ai-specs-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--white-alpha-05);
  color: var(--white-alpha-80);
  vertical-align: middle;
}

.ai-specs-table tbody td:first-child {
  text-align: right;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}

.ai-specs-table tbody td:nth-child(2) {
  background: rgba(212, 168, 67, 0.04);
  color: var(--gold-1);
  font-weight: 600;
}

.ai-specs-table tbody tr:hover {
  background: var(--white-alpha-05);
}

/* ============================
   8. GOLD STATS BAND
   (Reuses .authority-stats from plans.css)
   ============================ */

/* ============================
   9. AI DEMO PREVIEW
   ============================ */
.ai-demo-preview {
  background: var(--dark-3);
}

.ai-demo-frame {
  max-width: 900px;
  margin: 0 auto 40px;
  border-radius: var(--radius);
  overflow: hidden;
}

.ai-demo-browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid var(--white-alpha-10);
}

.ai-demo-dots {
  display: flex;
  gap: 6px;
}

.ai-demo-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ai-demo-dots span:nth-child(1) { background: #ff5f57; }
.ai-demo-dots span:nth-child(2) { background: #ffbd2e; }
.ai-demo-dots span:nth-child(3) { background: #28c840; }

.ai-demo-url {
  flex: 1;
  padding: 6px 14px;
  background: var(--white-alpha-05);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--white-alpha-60);
  direction: ltr;
  text-align: left;
}

.ai-demo-chat-body {
  padding: 24px;
  background: var(--dark-1);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 85%;
}

.ai-chat-msg--user {
  margin-right: auto;
  flex-direction: row-reverse;
}

.ai-chat-msg--bot {
  margin-left: auto;
}

.ai-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
}

.ai-chat-msg--bot .ai-chat-avatar {
  background: var(--gold-gradient);
  color: var(--dark-1);
}

.ai-chat-msg--user .ai-chat-avatar {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white-alpha-80);
}

.ai-chat-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.8;
}

.ai-chat-msg--bot .ai-chat-bubble {
  background: var(--white-alpha-05);
  color: var(--white-alpha-80);
  border-top-right: 4px;
}

.ai-chat-msg--user .ai-chat-bubble {
  background: rgba(212, 168, 67, 0.12);
  color: var(--white-alpha-80);
  border-top-left: 4px;
}

.ai-chat-input-mock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white-alpha-05);
  border-radius: 12px;
  margin-top: auto;
}

.ai-chat-input-mock span {
  flex: 1;
  font-size: 0.85rem;
  color: var(--white-alpha-60);
}

.ai-chat-input-mock .mock-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-input-mock .mock-send svg {
  width: 18px;
  height: 18px;
  color: var(--dark-1);
}

/* ============================
   10. FAQ
   ============================ */
.ai-faq {
  background: var(--dark-1);
}

/* Reuses .faq-list, .faq-item, .faq-question, .faq-arrow, .faq-answer, .faq-answer-inner from plans.css */

/* ============================
   11. FINAL CTA
   ============================ */
.ai-cta {
  background: var(--dark-3);
  position: relative;
  overflow: hidden;
}

.ai-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(212, 168, 67, 0.08), transparent);
}

.ai-cta .cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* ============================
   RESPONSIVE — AI Page
   ============================ */

@media (max-width: 1024px) {
  .ai-panel.active {
    grid-template-columns: 1fr;
  }

  .ai-cap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-pipeline {
    flex-wrap: wrap;
    justify-content: center;
  }

  .ai-pipeline-step {
    flex: 0 0 calc(33.333% - 16px);
  }

  .ai-pipeline-arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .ai-hero .hero-content h1 {
    font-size: 2rem;
  }

  .ai-hero .hero-content .subtitle {
    font-size: 1rem;
  }

  .ai-hero {
    min-height: 70vh;
  }

  .ai-pain-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-tabs {
    gap: 6px;
  }

  .ai-tab {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .ai-panel.active {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ai-cap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-ba-grid {
    grid-template-columns: 1fr;
  }

  .ai-pipeline {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-pipeline-step {
    flex: auto;
  }

  .ai-pipeline-arrow {
    display: none;
  }

  .ai-specs-table {
    font-size: 0.82rem;
  }

  .ai-demo-chat-body {
    min-height: 260px;
  }

  .ai-chat-msg {
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  .ai-hero .hero-content h1 {
    font-size: 1.6rem;
  }

  .ai-pain-grid {
    grid-template-columns: 1fr;
  }

  .ai-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .ai-feature-detail h3 {
    font-size: 1.3rem;
  }

  .ai-cap-grid {
    grid-template-columns: 1fr;
  }

  .ai-ba-card {
    padding: 24px;
  }
}
