/* AI Asistan sayfası — styles.css ile uyumlu */
.nav-menu a.nav-active {
  color: #7dd3fc;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ai-page {
  padding: 0 0 72px;
}

/* — Sohbet kutusu (sayfa en üstü, header altı) — */
.ai-top-chat {
  padding-top: 44px;
  padding-bottom: 8px;
}

.ai-top-chat .ai-disclaimer {
  margin-top: 14px;
}

/* — Üst SEO / yapay zeka paneli (tam genişlik) — */
.ai-seo-panel {
  background: linear-gradient(135deg, #0b1f3a 0%, #153a6b 42%, #0c2748 100%);
  color: #e2e8f0;
  padding: 40px 20px 44px;
  margin-top: 28px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.ai-seo-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 18% 28%,
      rgba(249, 115, 22, 0.16),
      transparent 42%
    ),
    radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.14), transparent 38%);
  pointer-events: none;
}

.ai-seo-panel-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}

.ai-seo-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fed7aa;
}

.ai-seo-panel .ai-seo-panel-h2 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 3.8vw, 2.1rem);
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(15, 23, 42, 0.35);
  max-width: 52rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ai-seo-lead {
  margin: 0 0 18px;
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 58rem;
}

.ai-seo-lead strong {
  color: #fef3c7;
  font-weight: 600;
}

.ai-seo-pills {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-seo-pills li {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
}

.ai-seo-cta-line {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-seo-cta-line a {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ai-seo-cta-line a:hover {
  color: #fde68a;
}

.ai-seo-cta-sep {
  margin: 0 0.35em;
  color: rgba(226, 232, 240, 0.45);
  font-weight: 400;
}

/* — Geniş içerik sütunu + sohbet — */
.ai-wide {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.ai-hero-inline {
  text-align: center;
  max-width: 52rem;
  margin: 0 auto 22px;
}

.ai-hero-h1 {
  margin: 0 0 10px;
  padding-top: 2rem;
  font-size: clamp(1.7rem, 4.5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--navy);
  position: relative;
}

/* Gradient başlık — eski tarayıcılar düz lacivert metin görür */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ai-hero-h1 {
    background-image: linear-gradient(
      118deg,
      #0b1f3a 0%,
      #1e3a8a 32%,
      #1d4ed8 58%,
      #0e7490 88%,
      #0891b2 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.ai-hero-h1::after {
  content: "";
  display: block;
  width: min(12rem, 72%);
  height: 4px;
  margin: 1.1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22d3ee, #fbbf24);
  box-shadow: 0 2px 16px rgba(56, 189, 248, 0.35);
}

.ai-hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Sarı uyarı — sohbet kutusu ile aynı genişlik (ai-wide sütunu) */
.ai-hero-notice {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.58;
  color: #78350f;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  border-left-width: 4px;
  border-left-color: #f59e0b;
  box-sizing: border-box;
}

.ai-hero-notice strong {
  color: #92400e;
}

.ai-notice-below-chat {
  width: 100%;
  max-width: 100%;
  margin: 18px 0 0;
  border-radius: 20px;
}

.ai-shell {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: min(78vh, 720px);
}

.ai-shell-head {
  padding: 16px 22px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-shell-head .ai-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  padding: 5px 12px;
  border-radius: 999px;
}

.ai-shell-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
}

.ai-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.ai-msg {
  max-width: 92%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-msg.bot {
  align-self: flex-start;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--slate);
  border-bottom-left-radius: 4px;
}

.ai-msg.err {
  align-self: stretch;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ai-msg.hint {
  align-self: stretch;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.88rem;
}

.ai-input-row {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.ai-input-row textarea {
  flex: 1;
  min-height: 52px;
  max-height: 160px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font: inherit;
  color: var(--slate);
}

.ai-input-row textarea:focus {
  outline: none;
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.ai-input-row button {
  flex-shrink: 0;
  padding: 12px 22px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
}

.ai-input-row button.ai-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 12px 14px;
}

.ai-input-row button.ai-send-btn svg {
  display: block;
}

.ai-input-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ai-disclaimer {
  max-width: 100%;
  margin: 22px auto 0;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.ai-disclaimer a {
  color: var(--blue-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-disclaimer a:hover {
  color: var(--orange);
}

/* — SEO makale (sayfa altı) — */
.ai-seo-article {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  max-width: 52rem;
}

.ai-seo-article--lean {
  margin-top: 32px;
  padding-top: 28px;
}

/* — Uzun SEO makale + FAQ — */
.ai-seo-long {
  margin-top: 36px;
  padding-top: 12px;
  padding-bottom: 40px;
  border-top: none;
}

.ai-seo-long-lead {
  font-size: 1.04rem;
  line-height: 1.78;
  color: var(--slate);
  margin: 0 0 26px;
}

.ai-seo-long h2 {
  margin: 34px 0 14px;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.ai-seo-long h2:first-of-type {
  margin-top: 0;
}

.ai-seo-long h3 {
  margin: 22px 0 10px;
  font-size: 1.02rem;
  color: var(--navy-soft);
  font-weight: 700;
}

.ai-faq {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.ai-faq-list {
  margin-top: 8px;
}

.ai-faq-q {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}

.ai-faq-a {
  margin: 0 0 22px;
  color: var(--slate);
  font-size: 0.97rem;
  line-height: 1.68;
}

.ai-faq-item:last-child .ai-faq-a {
  margin-bottom: 0;
}

.ai-seo-checklist {
  margin: 0 0 8px;
  padding-left: 1.25rem;
  color: var(--slate);
  font-size: 0.98rem;
  line-height: 1.65;
}

.ai-seo-checklist li {
  margin-bottom: 8px;
}

.ai-seo-article h2 {
  margin: 28px 0 12px;
  font-size: 1.2rem;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ai-seo-article h2:first-child {
  margin-top: 0;
}

.ai-seo-article p {
  margin: 0 0 14px;
  color: var(--slate);
  font-size: 0.98rem;
  line-height: 1.72;
}

.ai-seo-article strong {
  color: var(--navy);
  font-weight: 600;
}

.ai-seo-article a {
  color: var(--blue-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-seo-article a:hover {
  color: var(--orange);
}

.ai-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 32px 16px;
  line-height: 1.55;
}

.ai-typing {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 4px;
}

@media (min-width: 1100px) {
  .ai-shell {
    border-radius: 22px;
    min-height: 500px;
    max-height: min(80vh, 760px);
  }

  .ai-notice-below-chat {
    border-radius: 22px;
  }
}

@media (max-width: 720px) {
  .ai-top-chat {
    padding-top: 28px;
    padding-bottom: 6px;
  }

  .ai-wide {
    padding: 0 14px;
  }

  .ai-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .ai-input-row textarea {
    min-width: 0;
    width: 100%;
  }

  .ai-input-row button.ai-send-btn {
    width: 100%;
    min-height: 48px;
  }

  .ai-page {
    padding-bottom: 52px;
  }

  .ai-seo-panel {
    padding: 28px 14px 32px;
    margin-top: 18px;
    margin-bottom: 28px;
  }

  .ai-seo-article {
    margin-top: 36px;
    padding-top: 28px;
  }
}
