/* ── Industry Analyzer ── */

.ia-section {
  padding: 80px 24px 40px;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.ia-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(210, 105, 30, 0.25),
    transparent
  );
}

.ia-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Header ── */
.ia-header {
  text-align: center;
  margin-bottom: 48px;
}

.ia-badge {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(210, 105, 30, 0.1);
  color: #c05000;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid rgba(210, 105, 30, 0.2);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.ia-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: #1a1e23;
  margin-bottom: 12px;
  line-height: 1.3;
}

.ia-title .ia-highlight {
  background: linear-gradient(135deg, #d2691e, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ia-subtitle {
  color: #5d4037;
  font-size: 1rem;
  line-height: 1.7;
}

.ia-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #e07b3a;
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: iaBlink 0.7s step-end infinite;
}

@keyframes iaBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ── Showcase Carousel ── */
.ia-showcase {
  background: #faf7f2;
  border: 1px solid rgba(210, 105, 30, 0.12);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 36px;
  position: relative;
  min-height: 200px;
  overflow: hidden;
}

.ia-showcase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(210, 105, 30, 0.12);
}

.ia-showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e07b3a;
  animation: iaPulse 2s ease-in-out infinite;
}

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

.ia-showcase-label {
  color: #8d6e63;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ia-showcase-industry {
  color: #e07b3a;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: auto;
  letter-spacing: 0.05em;
}

.ia-showcase-body {
  min-height: 140px;
}

.ia-showcase-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.ia-showcase-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.ia-showcase-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  margin-top: 2px;
}

.ia-showcase-text {
  color: #3e2723;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ia-showcase-text strong {
  color: #1a1e23;
  font-weight: 700;
}

/* ── Industry Selection ── */
.ia-select {
  margin-bottom: 32px;
  background: linear-gradient(135deg, #fff8f0, #fff3e6);
  border: 2px solid rgba(210, 105, 30, 0.3);
  border-radius: 20px;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow:
    0 0 24px rgba(210, 105, 30, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04);
  animation: iaSelectGlow 3s ease-in-out infinite;
}

@keyframes iaSelectGlow {
  0%,
  100% {
    box-shadow:
      0 0 24px rgba(210, 105, 30, 0.08),
      0 4px 16px rgba(0, 0, 0, 0.04);
  }
  50% {
    box-shadow:
      0 0 32px rgba(210, 105, 30, 0.18),
      0 4px 20px rgba(0, 0, 0, 0.06);
  }
}

.ia-select-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ia-select-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #e07b3a, #c05000);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  flex-shrink: 0;
  animation: iaBounceArrow 2s ease-in-out infinite;
}

@keyframes iaBounceArrow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.ia-select-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #c05000;
  letter-spacing: 0.02em;
}

.ia-select-hint {
  color: #6d4c41;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 18px;
  padding-left: 38px;
}

.ia-select-label {
  color: #5d4037;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: block;
}

.ia-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.ia-tag {
  padding: 10px 20px;
  background: #fff;
  border: 1.5px solid rgba(210, 105, 30, 0.22);
  border-radius: 100px;
  color: #5d4037;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ia-tag:hover {
  background: rgba(210, 105, 30, 0.08);
  border-color: rgba(210, 105, 30, 0.5);
  color: #c05000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(210, 105, 30, 0.15);
}

.ia-tag.active {
  background: linear-gradient(135deg, #c05000, #e07b3a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(210, 105, 30, 0.3);
  transform: translateY(-1px);
}

.ia-input-row {
  display: flex;
  gap: 10px;
}

.ia-input {
  flex: 1;
  padding: 12px 18px;
  background: #faf7f2;
  border: 1px solid rgba(210, 105, 30, 0.15);
  border-radius: 12px;
  color: #1a1e23;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.ia-input::placeholder {
  color: #a1887f;
}

.ia-input:focus {
  border-color: rgba(210, 105, 30, 0.5);
  box-shadow: 0 0 20px rgba(210, 105, 30, 0.1);
}

.ia-submit {
  padding: 12px 28px;
  background: linear-gradient(135deg, #c05000, #a87000);
  border: 1px solid rgba(255, 200, 100, 0.3);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: inherit;
}

.ia-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #e06000, #c05000);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.4);
}

.ia-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Result Area ── */
.ia-result {
  background: #faf7f2;
  border: 1px solid rgba(210, 105, 30, 0.12);
  border-radius: 16px;
  overflow: hidden;
  display: none;
}

.ia-result.visible {
  display: block;
  animation: iaFadeIn 0.5s ease;
}

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

.ia-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(210, 105, 30, 0.12);
  background: rgba(210, 105, 30, 0.06);
}

.ia-result-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d2691e, #cd853f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.ia-result-meta {
  flex: 1;
}

.ia-result-name {
  color: #1a1e23;
  font-size: 0.9rem;
  font-weight: 700;
}

.ia-result-status {
  color: #8d6e63;
  font-size: 0.75rem;
}

.ia-result-body {
  padding: 24px;
  color: #3e2723;
  font-size: 0.92rem;
  line-height: 1.8;
  min-height: 120px;
}

.ia-result-body h3 {
  color: #e07b3a;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 20px 0 8px;
}

.ia-result-body h3:first-child {
  margin-top: 0;
}

.ia-result-body ul {
  padding-left: 20px;
  margin: 8px 0;
}

.ia-result-body li {
  margin-bottom: 6px;
}

.ia-result-body strong {
  color: #1a1e23;
}

.ia-result-body p {
  margin-bottom: 10px;
}

/* ── Loading ── */
.ia-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  color: #8d6e63;
  font-size: 0.9rem;
}

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

.ia-loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e07b3a;
  animation: iaLoadDot 1.4s ease-in-out infinite;
}

.ia-loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.ia-loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes iaLoadDot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ── Error ── */
.ia-error {
  color: #ff6b6b;
  padding: 16px 0;
  font-size: 0.9rem;
}

/* ── Remaining count ── */
.ia-remaining {
  text-align: center;
  margin-top: 16px;
  color: #a1887f;
  font-size: 0.78rem;
}

/* ── Simulated Chat ── */
.ia-chat {
  margin-top: 32px;
  background: #faf7f2;
  border: 1px solid rgba(210, 105, 30, 0.12);
  border-radius: 16px;
  overflow: hidden;
}

.ia-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(210, 105, 30, 0.1);
  background: rgba(210, 105, 30, 0.04);
}

.ia-chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  animation: iaChatPulse 2s ease-in-out infinite;
}

@keyframes iaChatPulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.ia-chat-label {
  color: #5d4037;
  font-size: 0.82rem;
  font-weight: 600;
}

.ia-chat-live {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: #4caf50;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.1em;
}

.ia-chat-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 420px;
  overflow-y: auto;
}

/* Chat message row */
.ia-chat-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.ia-chat-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.ia-chat-row.right {
  flex-direction: row-reverse;
}

/* Avatar */
.ia-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(210, 105, 30, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ia-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bubble */
.ia-chat-bubble {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #3e2723;
  position: relative;
}

.ia-chat-row:not(.right) .ia-chat-bubble {
  background: #fff;
  border: 1px solid rgba(210, 105, 30, 0.1);
  border-bottom-left-radius: 4px;
}

.ia-chat-row.right .ia-chat-bubble {
  background: linear-gradient(135deg, #fff3e6, #ffecda);
  border: 1px solid rgba(210, 105, 30, 0.15);
  border-bottom-right-radius: 4px;
}

/* Name label */
.ia-chat-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8d6e63;
  margin-bottom: 4px;
}

/* Typing cursor */
.ia-chat-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #e07b3a;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: iaBlink 0.7s step-end infinite;
}

/* Typing dots indicator */
.ia-chat-typing-dots {
  display: flex;
  gap: 4px;
  padding: 8px 4px;
}

.ia-chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bcaaa4;
  animation: iaTypingDot 1.4s ease-in-out infinite;
}

.ia-chat-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.ia-chat-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes iaTypingDot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ── Chat RWD ── */
@media (max-width: 767px) {
  .ia-section {
    padding: 56px 16px 32px;
  }

  .ia-showcase {
    padding: 16px;
  }

  .ia-select {
    padding: 20px 16px 18px;
  }

  .ia-select-title {
    font-size: 0.95rem;
  }

  .ia-select-hint {
    padding-left: 0;
    font-size: 0.82rem;
  }

  .ia-tags {
    gap: 8px;
  }

  .ia-tag {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .ia-input-row {
    flex-direction: column;
  }

  .ia-submit {
    width: 100%;
    text-align: center;
  }

  .ia-result-body {
    padding: 16px;
    font-size: 0.88rem;
  }

  .ia-chat-body {
    padding: 14px;
    gap: 12px;
  }

  .ia-chat-avatar {
    width: 32px;
    height: 32px;
  }

  .ia-chat-bubble {
    max-width: 78%;
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .ia-section {
    padding: 40px 12px 24px;
  }

  .ia-title {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
  }

  .ia-showcase {
    padding: 12px;
  }

  .ia-select {
    padding: 16px 12px 14px;
  }

  .ia-select-title {
    font-size: 0.88rem;
  }

  .ia-tag {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .ia-chat-body {
    padding: 10px;
    gap: 10px;
    max-height: 340px;
  }

  .ia-chat-avatar {
    width: 28px;
    height: 28px;
  }

  .ia-chat-bubble {
    max-width: 82%;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .ia-chat-name {
    font-size: 0.68rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .ia-section {
    padding: 64px 20px 36px;
  }
}
