/* ===========================================================
   NEXORA HORIZON AI — assets/css/enhancements.css
   Asistan bileşenleri ve marka efektleri.

   Şablonun kendi stilleri (style.css) değiştirilmedi; buradaki
   her şey yeni eklenen bileşenlere aittir.
   =========================================================== */

/* -------------------- LAUNCHER: MARKA İŞARETİ --------------------
   Logodaki gezegen ufku: kubbe, ışık noktası, ince dikey huzme
   (2026-09-25; eski dört köşeli yıldızın yerine). */

#ai-chat-toggle {
  position: relative;
  isolation: isolate;
}

/* Dışa doğru genişleyip sönen hale — "canlı" hissi verir */
#ai-chat-toggle::before,
#ai-chat-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid rgba(0, 224, 255, 0.55);
  opacity: 0;
  z-index: -1;
  animation: chatHalo 3.6s ease-out infinite;
}
#ai-chat-toggle::after { animation-delay: 1.8s; }

@keyframes chatHalo {
  0%   { transform: scale(1);    opacity: 0.55; }
  70%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Işık noktası: logodaki gibi nabız atar, hover'da hızlanıp parlar.
   Aynı efekt sohbet başlığındaki küçük rozette de kullanılır —
   launcher ile başlık arasında marka dili kopmasın. */
#ai-chat-toggle .chat-mark-point,
#ai-chat-window .chat-badge .chat-mark-point {
  transform-box: fill-box;
  transform-origin: center;
  animation: chatPointPulse 3.6s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.7));
}

@keyframes chatPointPulse {
  0%, 100% { transform: scale(.86); opacity: .85; }
  50%      { transform: scale(1.12); opacity: 1; }
}

#ai-chat-toggle:hover .chat-mark-point {
  animation-duration: 1.8s;
  filter: drop-shadow(0 0 6px rgba(0, 224, 255, 0.95));
}

/* Ufuk yayı: logodaki gibi nabız atar */
#ai-chat-toggle .chat-mark-horizon,
#ai-chat-window .chat-badge .chat-mark-horizon {
  animation: chatHorizonPulse 4s ease-in-out infinite alternate;
}

@keyframes chatHorizonPulse {
  0%   { opacity: 0.4; }
  100% { opacity: 0.9; }
}

#ai-chat-toggle:hover {
  box-shadow: 0 12px 34px rgba(18, 107, 255, 0.5), 0 0 26px rgba(0, 224, 255, 0.4);
}

/* Sohbet açıkken halkalar susar: dikkat dağıtmasın */
#ai-chat-widget.is-open #ai-chat-toggle::before,
#ai-chat-widget.is-open #ai-chat-toggle::after {
  animation-play-state: paused;
  opacity: 0;
}

/* -------------------- HERO İZLEME PANELİ --------------------
   2026-09-25: eski grafik ("%30", 50→180 eğrisi) kaynaksız bir rakam
   gösteriyordu. Yerine rakamsız bir çizim: nabız çizgisi + izlenen
   katmanlar. Canlı veri iddiası yok; renkler koyu temada jetonlardan
   (theme-dark.css --nx-*) gelir, açıkta yedek değerler kullanılır. */
.hero-monitor__line {
  stroke-dasharray: 520;
  stroke-dashoffset: 0;
  animation: heroMonitorTrace 3.6s ease-in-out infinite;
}
@keyframes heroMonitorTrace {
  0%   { stroke-dashoffset: 520; opacity: .35; }
  45%  { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
.hero-monitor__row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem .875rem;
  border-radius: .875rem;
  background: var(--nx-surface-2, rgba(255, 255, 255, .72));
  border: 1px solid var(--nx-line, #EEF2F7);
  font-size: .875rem;
  font-weight: 600;
  color: var(--nx-text, #334155);
}
.hero-monitor__row > i {
  width: 1.25rem;
  text-align: center;
  color: #126BFF;
}
.hero-monitor__state {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--nx-muted, #64748B);
  white-space: nowrap;
}
.hero-monitor__dot {
  position: relative;
  width: .5rem;
  height: .5rem;
  border-radius: 9999px;
  background: #22C55E;
}
.hero-monitor__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #22C55E;
  animation: heroMonitorDot 2.4s ease-out infinite;
}
@keyframes heroMonitorDot {
  0%   { transform: scale(1); opacity: .55; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-monitor__line,
  .hero-monitor__dot::after { animation: none; }
}
@media (forced-colors: active) {
  .hero-monitor__dot,
  .hero-monitor__dot::after { background: CanvasText; forced-color-adjust: none; }
}

/* -------------------- HİZMET AYRINTISI (2026-09-25, satır içi) --------------------
   Eski içerik modalının yerine: kartın satırının altında tam genişlik panel
   (main.js initServiceDetails). Açılış grid-template-rows 0fr → 1fr + saydamlık;
   hareket azaltmada animasyonsuz. Renkler koyu temada theme-dark.css jetonlarından. */
[data-service].is-open { border-color: #126BFF; box-shadow: 0 0 0 3px rgba(18, 107, 255, .15); }
.service-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .28s ease, opacity .22s ease;
}
.service-detail.is-open { grid-template-rows: 1fr; opacity: 1; }
.service-detail[hidden] { display: none; }
.service-detail__inner { overflow: hidden; min-height: 0; }
.service-detail__box {
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: var(--nx-surface, #FFFFFF);
  border: 1px solid rgba(18, 107, 255, .35);
  box-shadow: 0 18px 40px -24px rgba(10, 27, 61, .35);
}
@media (min-width: 768px) { .service-detail__box { padding: 2rem 2.25rem; } }
.service-detail__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.service-detail__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #FFFFFF;
  background: linear-gradient(135deg, #126BFF, #0A4FC4);
  box-shadow: 0 8px 20px -8px rgba(18, 107, 255, .55);
}
.service-detail__title { font-size: 1.25rem; font-weight: 800; line-height: 1.25; color: var(--nx-text, #0A1B3D); }
@media (min-width: 768px) { .service-detail__title { font-size: 1.375rem; } }
.service-detail__title:focus { outline: none; }
.service-detail__title:focus-visible { outline: 2px solid #126BFF; outline-offset: 4px; border-radius: .375rem; }
.service-detail__body { color: var(--nx-muted, #4B5563); font-size: .9375rem; line-height: 1.7; }
@media (min-width: 768px) {
  .service-detail__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; }
}
.service-detail__body p { margin-bottom: .875rem; }
.service-detail__body h4 { font-weight: 700; color: var(--nx-text, #1F2937); margin: 0 0 .5rem; }
.service-detail__body ul { list-style: disc; padding-left: 0; padding-inline-start: 1.25rem; margin-bottom: .875rem; }
.service-detail__body li + li { margin-top: .4rem; }
.service-detail__body strong { color: var(--nx-text, #111827); }
.service-detail__body [class*="text-gray-"] { color: inherit; }
.service-detail__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.service-detail__quote {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1.5rem;
  border-radius: 9999px;
  background: #126BFF;
  color: #FFFFFF;
  font-weight: 700;
  font-size: .875rem;
  box-shadow: 0 10px 24px -10px rgba(18, 107, 255, .6);
}
.service-detail__quote:hover { background: #0A4FC4; }
.service-detail__close {
  padding: .7rem 1.25rem;
  border-radius: 9999px;
  background: var(--nx-surface-3, #E5E7EB);
  color: var(--nx-text, #374151);
  font-weight: 700;
  font-size: .875rem;
}
.service-detail__quote:focus-visible, .service-detail__close:focus-visible { outline: 2px solid #126BFF; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .service-detail { transition: none; }
}

/* -------------------- AI BÖLÜMÜ AÇILIŞI (2026-09-25) --------------------
   Logo ışığı: logonun kendisi (<use>, koyu çizim), tepe noktası çevresinden
   kırpılmış; huzme kutuya sığacak kadar kısaltılır. Ufuk çizgisi parıltısı
   (iki uçtan tepeye) yalnız burada açık. Kenarlar maskeyle yumuşak söner (yay
   kırpma çizgisinde kesik görünmesin). Hareket azaltmada logonun kendi kuralı
   (--nx-logo-motion: paused) animasyonu durdurur. */
.ai-opener__mark {
  --nx-logo-beam: .45;
  --nx-logo-sweep: 1;
  display: block;
  width: 300px;
  max-width: 80%;
  height: auto;
  aspect-ratio: 320 / 130;
  margin: 0 auto 1rem;
  -webkit-mask-image: radial-gradient(ellipse 50% 60% at 50% 45%, #000 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 60% at 50% 45%, #000 65%, transparent 100%);
}

/* -------------------- AI ÇÖZÜMLERİ SEÇİCİSİ (2026-09-25) --------------------
   Varsayılan (dar ekran, JS kapalı): liste gizli, üç ayrıntı alt alta.
   .is-tabs (lg + JS): iki sütun; yalnız seçili ayrıntı görünür. */
.ai-picker__panels { display: grid; }
.ai-picker__panel {
  border-radius: 1.25rem;
  padding: 1rem 1.125rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
}
@media (min-width: 768px) { .ai-picker__panel { padding: 2rem; border-radius: 1.5rem; } }
.ai-picker__panels { gap: .75rem; }
@media (min-width: 768px) { .ai-picker__panels { gap: 1rem; } }
.ai-picker.is-tabs {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem;
  align-items: start;
}
.ai-picker.is-tabs .ai-picker__panel[hidden] { display: none; }
.ai-picker__list { display: flex; flex-direction: column; gap: .75rem; }
.ai-picker__list[hidden] { display: none; }
.ai-picker__tab {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: start;
  padding: 1rem 1.125rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
  color: #94A3B8;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.ai-picker__tab:hover { background: rgba(255, 255, 255, .05); color: #E2E8F0; }
.ai-picker__tab[aria-selected="true"] {
  background: rgba(18, 107, 255, .14);
  border-color: rgba(0, 224, 255, .45);
  color: #FFFFFF;
  box-shadow: inset 3px 0 0 #00E0FF;
}
[dir="rtl"] .ai-picker__tab[aria-selected="true"] { box-shadow: inset -3px 0 0 #00E0FF; }
.ai-picker__tab:focus-visible { outline: 2px solid #00E0FF; outline-offset: 2px; }
.ai-picker__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.ai-picker__title { font-weight: 700; font-size: 1rem; }
.ai-picker__desc { font-size: .8125rem; line-height: 1.45; color: #94A3B8; }
.ai-picker__tab[aria-selected="true"] .ai-picker__desc { color: #CBD5E1; }
.ai-picker__no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; color: #00E0FF; opacity: .8; }
.ai-picker__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 107, 255, .2);
  border: 1px solid rgba(18, 107, 255, .35);
  color: #00E0FF;
}
.ai-picker__icon--lg { width: 3.25rem; height: 3.25rem; font-size: 1.25rem; }
.ai-picker__lead { display: block; margin-top: .2rem; color: #94A3B8; font-size: .8125rem; line-height: 1.45; font-weight: 400; }
/* Başlıklar: sekmede masaüstü başlığı, akordeonda dokunulan başlık */
.ai-picker.is-tabs .ai-picker__mhead { display: none; }
.ai-picker:not(.is-tabs) .ai-picker__dhead { display: none; }
.ai-picker__mhead { margin: 0; }
.ai-picker__toggle {
  display: flex;
  align-items: center;
  gap: .875rem;
  width: 100%;
  text-align: start;
  color: #FFFFFF;
}
.ai-picker__toggle:focus-visible { outline: 2px solid #00E0FF; outline-offset: 4px; border-radius: .75rem; }
.ai-picker__mtext { flex: 1; min-width: 0; }
.ai-picker__mtitle { display: block; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.ai-picker__chev { font-size: .75rem; color: #94A3B8; transition: transform .2s ease; }
.ai-picker__toggle[aria-expanded="true"] .ai-picker__chev { transform: rotate(180deg); }
/* JS açıkken ayrıntı basılır; açık panelde kısa cümle ayrıntının ilk paragrafını tekrarlamasın */
.ai-picker.is-ready .ai-picker__toggle[aria-expanded="true"] .ai-picker__lead { display: none; }
.ai-picker__content { margin-top: 1rem; }
.ai-picker.is-tabs .ai-picker__content { margin-top: 0; }
.ai-picker__content[hidden] { display: none; }
.ai-picker__body { color: #CBD5E1; font-size: .9375rem; line-height: 1.7; }
.ai-picker__body:empty { display: none; }
.ai-picker__body p { margin-bottom: 1rem; }
.ai-picker__body ul { list-style: disc; padding-left: 0; padding-inline-start: 1.25rem; margin-bottom: 1rem; }
.ai-picker__body li + li { margin-top: .5rem; }
.ai-picker__body strong { color: #FFFFFF; }
.ai-picker__body [class*="text-gray-"] { color: inherit; }
.ai-picker__quote {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
  font-weight: 700;
  font-size: .875rem;
  color: #00E0FF;
}
.ai-picker__quote:hover { color: #FFFFFF; }
@media (prefers-reduced-motion: reduce) {
  .ai-picker__tab, .ai-picker__chev { transition: none; }
}

/* -------------------- GİZLİ HİZMET KARTI (2026-09-27) --------------------
   Hizmet kartları Tailwind `flex` taşır; .flex, tarayıcının [hidden] kuralını ezer.
   Kodda duran ama arayüzde gizli kart (ör. Siber Güvenlik) gerçekten gizlensin.
   Yazılımcı Kiralama artık ızgarada sıradan bir hizmet kartı (eski .staffing-* kaldırıldı). */
[data-service-grid] [data-service][hidden] { display: none !important; }

/* -------------------- NEDEN NEXORA (2026-09-25) -------------------- */
.why-card {
  border-radius: 1.25rem;
  padding: 1.125rem 1.25rem;
  background: var(--nx-surface, #FFFFFF);
  border: 1px solid var(--nx-line, #E5E7EB);
}
@media (min-width: 768px) { .why-card { padding: 1.75rem 2rem; } }
.why-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
  background: rgba(18, 107, 255, .1);
  color: #126BFF;
}
@media (max-width: 767px) {
  .why-card__icon { width: 2.25rem; height: 2.25rem; border-radius: .75rem; margin-bottom: .625rem; font-size: .875rem; }
  .why-card h3 { margin-bottom: .25rem; }
}
@media (min-width: 768px) { .why-card__icon { margin-bottom: 1rem; } }

/* -------------------- TESLİMAT AKORDEONU (2026-09-25) --------------------
   Yerel <details>: JS gerekmez, klavye ve ekran okuyucu desteği tarayıcıdan. */
.deliver-item {
  border-radius: 1rem;
  border: 1px solid var(--nx-line, #E5E7EB);
  background: var(--nx-surface, #FFFFFF);
}
.deliver-item__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--nx-text, #0A1B3D);
}
.deliver-item__head::-webkit-details-marker { display: none; }
.deliver-item__head:focus-visible { outline: 2px solid #126BFF; outline-offset: 2px; border-radius: 1rem; }
.deliver-item__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(18, 107, 255, .1);
  color: #126BFF;
}
.deliver-item__chev { font-size: .75rem; color: var(--nx-muted, #64748B); transition: transform .2s ease; }
.deliver-item[open] .deliver-item__chev { transform: rotate(180deg); }
.deliver-item__body {
  padding: 0 1rem .875rem;
  padding-inline-start: 1rem;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--nx-muted, #4B5563);
}
@media (min-width: 768px) {
  .deliver-item__head { gap: .875rem; padding: .875rem 1.125rem; }
  .deliver-item__body { padding: 0 1.125rem 1rem; padding-inline-start: 4.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .deliver-item__chev { transition: none; }
}

/* -------------------- FOOTER (2026-09-25) --------------------
   Her iki temada koyu; logo .nx-logo-on-dark ile koyu çizim. */
.site-footer {
  background: #071330;
  color: #FFFFFF;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.footer-link { color: #CBD5E1; transition: color .2s ease; }
.footer-link:hover { color: #00E0FF; }
.footer-label {
  margin-bottom: .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94A3B8;
}
.footer-lang {
  padding: .35rem .8rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, .15);
  font-size: .8125rem;
  font-weight: 600;
  color: #CBD5E1;
}
.footer-lang:hover { border-color: #00E0FF; color: #FFFFFF; }
.footer-lang[aria-current="true"] { background: rgba(18, 107, 255, .25); border-color: rgba(0, 224, 255, .55); color: #FFFFFF; }
.footer-theme {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .15);
  color: #CBD5E1;
}
.footer-theme:hover { border-color: #00E0FF; color: #FFFFFF; }
.footer-link:focus-visible, .footer-lang:focus-visible, .footer-theme:focus-visible { outline: 2px solid #00E0FF; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .footer-link { transition: none; }
}

/* -------------------- DAVET BALONU -------------------- */
#ai-chat-hint {
  position: relative;
  border-bottom-right-radius: 0.25rem;
}

/* İletişim formu görünürken launcher çekilir (bkz. main.js syncYield):
   "Gönder" düğmesinin üstüne binmesin. visibility, gizliyken sekme
   sırasından da çıkarır; geri gelirken hemen görünür olur. */
#ai-chat-widget {
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}
#ai-chat-widget.is-yielding {
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
@media (prefers-reduced-motion: reduce) {
  #ai-chat-widget,
  #ai-chat-widget.is-yielding { transition: none; }
}

/* -------------------- SOHBET BİLEŞENLERİ -------------------- */
.chat-suggestion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  background: #FFFFFF;
  color: #334155;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: start;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.chat-suggestion:hover {
  border-color: #126BFF;
  color: #126BFF;
  background: #F8FAFF;
}

.chat-quick {
  padding: 0.375rem 0.625rem;
  border: 1px solid rgba(18, 107, 255, 0.25);
  border-radius: 999px;
  color: #126BFF;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  background: #FFFFFF;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.chat-quick:hover {
  background: #EFF6FF;
  border-color: rgba(18, 107, 255, 0.55);
}

.chat-feedback-btn {
  padding: 0.2rem 0.55rem;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  color: #64748B;
  font-size: 0.68rem;
  font-weight: 600;
  background: #FFFFFF;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chat-feedback-btn:hover {
  border-color: #126BFF;
  color: #126BFF;
}

/* -------------------- SOHBET PENCERESİ --------------------
   Aşağıdakilerin tamamı görsel katmandır: HTML'deki Tailwind sınıfları
   ve düzen olduğu gibi durur, üzerine derinlik ve hareket eklenir. */

/* Açılış: aşağıdan yaylanarak gelir, kapanışta iz bırakmaz. */
#ai-chat-window:not(.hidden) {
  animation: chatWindowIn 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 24px 60px -12px rgba(10, 27, 61, 0.32),
    0 0 0 1px rgba(18, 107, 255, 0.08);
}

@keyframes chatWindowIn {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Başlıkta yavaşça kayan marka ışığı (aurora). Koyu lacivert zemin
   korunur; üzerine yalnızca çok düşük opaklıkta bir gradyan geçer. */
#ai-chat-window .chat-head {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
#ai-chat-window .chat-head::before {
  content: "";
  position: absolute;
  inset: -60% -30%;
  z-index: -1;
  background:
    radial-gradient(38% 60% at 20% 40%, rgba(18, 107, 255, 0.55), transparent 70%),
    radial-gradient(32% 55% at 78% 60%, rgba(0, 224, 255, 0.35), transparent 72%);
  animation: chatAurora 11s ease-in-out infinite alternate;
}

@keyframes chatAurora {
  from { transform: translate3d(-6%, -4%, 0) scale(1); }
  to   { transform: translate3d(8%, 5%, 0) scale(1.12); }
}

/* Başlıktaki rozet: launcher'ın küçültülmüş hâli. Işık noktası ve
   ufuk yayı yukarıdaki ortak kurallardan gelir. Dönen efekt yok
   (2026-09-25, kullanıcı isteği). */
#ai-chat-window .chat-badge {
  position: relative;
  isolation: isolate;
  background-image: linear-gradient(140deg, #2B84FF 0%, #126BFF 55%, #0A4FC4 100%);
  box-shadow: 0 3px 10px -3px rgba(0, 0, 0, 0.45);
}

/* "Çevrimiçi" noktası: gerçekten canlı olduğunu gösteren nabız */
#ai-chat-window .chat-online {
  position: relative;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: chatOnline 2.4s ease-out infinite;
}

@keyframes chatOnline {
  70%  { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Mesaj balonları: geldikleri yönden yaylanarak girer. */
#ai-chat-messages > div {
  animation: chatRowIn 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#ai-chat-messages > div[data-sender="user"] {
  animation-name: chatRowInUser;
}

@keyframes chatRowIn {
  from { opacity: 0; transform: translate3d(-10px, 8px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes chatRowInUser {
  from { opacity: 0; transform: translate3d(10px, 8px, 0); }
  to   { opacity: 1; transform: none; }
}

/* Ziyaretçi balonu düz mavi yerine marka gradyanı alır. */
.chat-bubble-user {
  background-image: linear-gradient(135deg, #126BFF 0%, #0A57DB 55%, #0A1B3D 140%);
  box-shadow: 0 6px 16px -6px rgba(18, 107, 255, 0.55);
}

/* Asistan balonu: hafif yükselti ve okunurluk için ince kenar ışığı */
.chat-bubble-bot {
  box-shadow: 0 2px 10px -4px rgba(15, 23, 42, 0.16);
}

/* Doğrulanmış yanıt yokken iletişim satırları (e-posta + telefon). Etiket üstte,
   değer altında: iki sütunda uzun etiket ("Correo electrónico", "Objetivo de
   respuesta") değer sütununu eziyordu — SE'de e-posta 12 satıra bölünüyor, telefon
   kartın 73 px dışına taşıyordu (mobil QA #10). */
.chat-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #F1F6FF;
  font-size: 13px;
}
.chat-contact dt { color: #475569; font-weight: 600; }
.chat-contact dt:not(:first-child) { margin-top: 6px; }
.chat-contact dd { margin: 0; min-width: 0; }
.chat-contact__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #0A57DB;
  font-weight: 600;
  white-space: nowrap;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-contact__link[data-contact="email"] { white-space: normal; }
.chat-contact__link:hover,
.chat-contact__link:focus-visible { color: #0A1B3D; }
.chat-contact__link:focus-visible { outline: 2px solid #126BFF; outline-offset: 2px; border-radius: 4px; }

/* Yazıyor göstergesi: sırayla zıplayan üç nokta */
.typing-dot {
  animation: chatTyping 1.3s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes chatTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* Giriş alanı odaklanınca marka halkası belirir. */
#ai-chat-form > div {
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
}
#ai-chat-form > div:focus-within {
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(18, 107, 255, 0.14);
}

/* Gönder düğmesi: gradyan + üzerinden geçen ışık */
#ai-chat-send {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(120deg, #126BFF 0%, #2B84FF 50%, #126BFF 100%);
  box-shadow: 0 4px 14px -5px rgba(18, 107, 255, 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#ai-chat-send::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
}
#ai-chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 20px -6px rgba(18, 107, 255, 0.8);
}
#ai-chat-send:hover::after {
  animation: chatSendSweep 0.75s ease-out;
}
#ai-chat-send:active {
  transform: translateY(0) scale(0.97);
}

@keyframes chatSendSweep {
  to { transform: translateX(120%); }
}

/* -------------------- HEADER MENÜSÜ --------------------
   Masaüstü menüsü lg'de (1024) açılır; 768'de sığmıyordu (mobil QA #5).
   1024'te DE/AR/ES bağlantıları iki satıra bölünmesin: metin sarılmaz,
   aralık lg'de dar (space-x-5 / rtl.css gap), xl'de geniş. */
#navbar-menu > a {
  white-space: nowrap;
}

/* -------------------- DOKUNMA HEDEFLERİ (mobil QA #8) --------------------
   Telefonda en az 44×44 px. Görünür boyu büyüyünce 320 px header'ı taşıracak
   düğmelerde (.tap-area; öğe konumlu olmalı) yalnız görünmez dokunma alanı
   büyür; bağlantılar, footer düğmeleri ve form alanları gerçekten büyür. */
.tap-area::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}
#contact-form .contact-field {
  min-height: 44px;
}
@media (max-width: 767px) {
  .footer-lang { min-height: 44px; }
  .footer-theme { width: 44px; height: 44px; }
  .footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
  }
  .site-footer ul.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
  .ai-picker__quote { min-height: 44px; }
}

/* -------------------- İLETİŞİM FORMU GERİ BİLDİRİMİ --------------------
   Doğrulama hataları yalnızca genel bir uyarı olarak değil, ilgili alanın
   hemen altında gösterilir. Renk tek başına anlam taşımaz: metin ve
   aria-invalid birlikte kullanılır. */

/* Hatalı alana odak (main.js focusField) ve klavyeyle geçiş alanı sabit
   header'ın (80 px) altına sokmasın: header + alanın üstündeki etiket. */
#contact-form input,
#contact-form select,
#contact-form textarea {
  scroll-margin-top: 7.5rem;
}
.contact-field-error {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 600;
  color: #dc2626;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.contact-field-error::before {
  content: "!";
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  line-height: 0.95rem;
  text-align: center;
}

.contact-field[aria-invalid="true"] {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.contact-field[aria-invalid="true"]:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626;
}

.contact-field-count {
  margin-top: 0.35rem;
  margin-inline-start: auto;
  font-size: 0.68rem;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.contact-field-count.is-near-limit {
  color: #b45309;
  font-weight: 600;
}

.contact-draft-hint {
  font-size: 0.7rem;
  color: #6b7280;
  text-align: center;
}

/* -------------------- BOT KORUMASI --------------------
   Bal küpü alanı görünmez ama `display:none` DEĞİL: bazı botlar
   gizlenmiş alanları atlar. Ekrandan taşırılır, ekran okuyucudan
   `aria-hidden` ile, klavye sırasından `tabindex="-1"` ile çıkarılır. */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* reCAPTCHA widget'ı sabit 304 px genişliktedir; dar ekranda taşmaması
   için ölçeklenir. transform kullanılır, layout yeniden hesaplanmaz. */
.contact-recaptcha {
  min-height: 78px;
}

@media (max-width: 360px) {
  .contact-recaptcha {
    transform: scale(0.87);
    transform-origin: 0 0;
    min-height: 68px;
  }
  [dir="rtl"] .contact-recaptcha { transform-origin: 100% 0; }
}

/* -------------------- HERO ROZETİ VE ROKET --------------------
   Roket sürekli ama çok yavaş süzülür: dikkat çeker, rahatsız etmez.
   Rozetin üstüne gelince kısa bir "kalkış" yapar ve geri döner.
   Tüm hareket transform/opacity ile; düzen yeniden hesaplanmaz. */
.hero-badge {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease;
}

.hero-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 107, 255, 0.35);
  box-shadow: 0 10px 24px -12px rgba(18, 107, 255, 0.55);
}

/* Rozetin içinden geçen ışık huzmesi. */
.hero-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(18, 107, 255, 0.14) 50%, transparent 60%);
  transform: translateX(-120%);
  pointer-events: none;
}

.hero-badge:hover::after {
  animation: nx-badge-sheen 0.9s ease-out;
}

@keyframes nx-badge-sheen {
  to { transform: translateX(120%); }
}

.hero-badge__rocket {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-end: 0.5rem;
  /* Süzülme: iki eksende farklı periyot, tekrar hissi vermez. */
  animation: nx-rocket-float 3.6s ease-in-out infinite;
}

@keyframes nx-rocket-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-8deg); }
  50%      { transform: translate3d(1.5px, -3px, 0) rotate(-2deg); }
}

/* İtki izi: roketin arkasında nabız atan küçük bir parıltı. */
.hero-badge__rocket::before {
  content: "";
  position: absolute;
  inset-inline-start: -0.28rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(18, 107, 255, 0.85) 0%, rgba(18, 107, 255, 0) 70%);
  animation: nx-rocket-thrust 1.1s ease-in-out infinite;
}

@keyframes nx-rocket-thrust {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50%      { opacity: 0.9;  transform: scale(1.25); }
}

/* Kalkış: rozete gelince roket ileri fırlar, sonra yerine döner. */
.hero-badge:hover .hero-badge__rocket {
  animation: nx-rocket-launch 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes nx-rocket-launch {
  0%   { transform: translate3d(0, 0, 0) rotate(-8deg); }
  35%  { transform: translate3d(-2px, 2px, 0) rotate(-16deg); }
  70%  { transform: translate3d(7px, -7px, 0) rotate(6deg); }
  100% { transform: translate3d(0, 0, 0) rotate(-8deg); }
}

[dir="rtl"] .hero-badge__rocket { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  .hero-badge,
  .hero-badge__rocket,
  .hero-badge__rocket::before,
  .hero-badge:hover .hero-badge__rocket,
  .hero-badge:hover::after {
    animation: none;
    transition: none;
  }
  .hero-badge:hover { transform: none; }
}

/* -------------------- YEREL DOĞRULAMA KUTUSU --------------------
   Turnstile/reCAPTCHA anahtarı tanımlı değilken görünen kutudur. Çıplak bir
   onay kutusu yerine gerçek bir güvenlik bileşeni gibi dursun diye kart
   biçiminde kurulur: solda işaretleme, sağda marka rozeti. Tüm hareketler
   transform/opacity ile yapılır ve azaltılmış hareket tercihinde susar. */
.humanbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.humanbox:hover {
  border-color: #C7D2FE;
}

/* İşaretlendiğinde kartın tamamı onaylanmış görünür. */
.humanbox:has(.humanbox__input:checked) {
  border-color: #86EFAC;
  background: linear-gradient(180deg, #F6FEF9 0%, #ECFDF3 100%);
}

.humanbox__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

/* Gerçek input erişilebilirlik için yerinde kalır; yalnız görsel olarak
   gizlenir, böylece klavye ve ekran okuyucu davranışı bozulmaz. */
.humanbox__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.humanbox__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border: 2px solid #D1D5DB;
  border-radius: 0.375rem;
  background: #FFFFFF;
  color: #FFFFFF;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.humanbox__mark svg {
  width: 0.95rem;
  height: 0.95rem;
  /* Tik, çizgi uzunluğu boyunca çizilerek görünür. */
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset 0.24s ease 0.04s;
}

.humanbox__input:checked + .humanbox__mark {
  background: #16A34A;
  border-color: #16A34A;
  transform: scale(1.04);
}

.humanbox__input:checked + .humanbox__mark svg {
  stroke-dashoffset: 0;
}

/* Input görsel olarak gizli olduğu için odak halkası işarete taşınır. */
.humanbox__input:focus-visible + .humanbox__mark {
  outline: 2px solid #126BFF;
  outline-offset: 2px;
}

.humanbox__input[aria-invalid="true"] + .humanbox__mark {
  border-color: #DC2626;
}

.humanbox__text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1F2937;
}

.humanbox__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #9CA3AF;
  flex-shrink: 0;
}

/* Yalnız kalkan simgesi: metin olmadan da "korumalı" mesajını verir ve
   dar ekranda yer kaplamaz. Anlam taşımadığı için aria-hidden'dır. */
.humanbox__brand svg {
  width: 1.625rem;
  height: 1.625rem;
  color: #126BFF;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.humanbox:has(.humanbox__input:checked) .humanbox__brand svg {
  color: #16A34A;
  opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
  .humanbox,
  .humanbox__mark,
  .humanbox__mark svg { transition: none; }
  .humanbox__input:checked + .humanbox__mark { transform: none; }
  .humanbox__mark svg { stroke-dashoffset: 0; }
  .humanbox__input:not(:checked) + .humanbox__mark svg { opacity: 0; }
}

[dir="rtl"] .contact-hp {
  left: auto;
  right: -9999px;
}

/* -------------------- HAREKET AZALTMA --------------------
   Kullanıcı sistemde hareketi azaltmayı seçtiyse tüm dekoratif
   animasyonlar susar; işlev aynen çalışmaya devam eder. */
@media (prefers-reduced-motion: reduce) {
  #ai-chat-toggle::before,
  #ai-chat-toggle::after,
  #ai-chat-toggle .chat-mark-point,
  #ai-chat-toggle .chat-mark-horizon,
  #ai-chat-window .chat-badge .chat-mark-point,
  #ai-chat-window .chat-badge .chat-mark-horizon,
  #ai-chat-window:not(.hidden),
  #ai-chat-window .chat-head::before,
  #ai-chat-window .chat-online,
  #ai-chat-messages > div,
  #ai-chat-send:hover::after,
  .typing-dot,
  .animate-blob,
  .animate-float,
  .animate-pulse-slow,
  .animate-spin-slow {
    animation: none !important;
  }
  #ai-chat-messages > div {
    opacity: 1 !important;
    transform: none !important;
  }
  .chart-pulse::before,
  .chart-pulse::after,
  .chart-pulse__orbit {
    animation: none !important;
  }
  .chart-pulse::before,
  .chart-pulse::after {
    opacity: 0;
  }
  #ai-chat-toggle::before,
  #ai-chat-toggle::after {
    opacity: 0;
  }
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
