/* Tailwind dışındaki küçük ek stiller */

/* static/icons içindeki SVG'leri metin rengine boyayan ikon sınıfı */
.ikon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}

/* Klavye ile gezenler için net odak çizgisi */
a:focus-visible, button:focus-visible {
  outline: 2px solid #ffc83d;
  outline-offset: 2px;
}

/* Logo: üzerine gelince hafifçe büyür, eğilir ve renkli gölge alır */
.logo-link img {
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), filter .35s ease;
}
.logo-link:hover img {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 6px 10px rgba(255, 45, 85, .45));
}

/* Kategori menüsü (lacivert bar): üzerine gelince sarı çizgi soldan sağa uzar */
.nav-link {
  position: relative;
  color: rgba(255, 255, 255, .85);
  transition: color .2s ease, background-color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: #ffc83d;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover { color: #fff; background-color: rgba(255, 255, 255, .08); }
.nav-link.aktif { color: #ffc83d; }
.nav-link:hover::after,
.nav-link.aktif::after { transform: scaleX(1); }

/* Son dakika bandı: haberler sağdan sola kayar, üzerine gelince durur */
@keyframes kay { to { transform: translateX(-100%); } }
.ticker { display: inline-block; padding-left: 100%; white-space: nowrap; animation: kay 45s linear infinite; }
.ticker:hover { animation-play-state: paused; }

/* "Son dakika" etiketindeki yanıp sönen nokta */
@keyframes nabiz { 50% { opacity: .3; transform: scale(.7); } }
.canli-nokta {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 9999px;
  background: #ff2d55;
  animation: nabiz 1.4s ease-in-out infinite;
}

/* Hareketi azaltmak isteyen kullanıcılar için animasyonlar kapanır */
@media (prefers-reduced-motion: reduce) {
  .ticker { animation: none; padding-left: 0; }
  .canli-nokta { animation: none; }
  .logo-link img, .nav-link::after { transition: none; }
}

/* Piyasa kutuları: artış yeşil, düşüş kırmızı, değişmeyen gri */
.degisim.yukari { background: #dcfce7; color: #15803d; }
.degisim.asagi  { background: #fee2e2; color: #b91c1c; }
.degisim.sabit  { background: #e5e7eb; color: #4b5563; }
@media (prefers-color-scheme: dark) {
  .degisim.yukari { background: rgba(34, 197, 94, .18); color: #86efac; }
  .degisim.asagi  { background: rgba(239, 68, 68, .2);  color: #fca5a5; }
  .degisim.sabit  { background: rgba(255, 255, 255, .12); color: #d4d4d8; }
}

/* Fiyat değişince kutu bir kez sarı halkayla parlar */
@keyframes kutu-parla {
  0%   { box-shadow: 0 0 0 0 rgba(255, 200, 61, .8); }
  100% { box-shadow: 0 0 0 12px rgba(255, 200, 61, 0); }
}
.piyasa-kutu.guncellendi { animation: kutu-parla .9s ease-out; }
@media (prefers-reduced-motion: reduce) { .piyasa-kutu.guncellendi { animation: none; } }

/* Sağ altta yüzen WhatsApp ve Instagram düğmeleri */
.sosyal-dugme {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(16, 20, 58, .3);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.sosyal-dugme:hover { transform: scale(1.1) translateY(-2px); box-shadow: 0 14px 30px rgba(16, 20, 58, .4); }
.sosyal-wa { background: #25d366; }
.sosyal-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }

/* Üzerine gelince solda açılan yazı */
.sosyal-etiket {
  position: absolute;
  right: calc(100% + .75rem);
  top: 50%;
  transform: translate(8px, -50%);
  white-space: nowrap;
  background: #10143a;
  color: #fff;
  font: 700 .8rem 'Instrument Sans', system-ui, sans-serif;
  padding: .45rem .9rem;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.sosyal-dugme:hover .sosyal-etiket,
.sosyal-dugme:focus-visible .sosyal-etiket { opacity: 1; transform: translate(0, -50%); }

/* WhatsApp düğmesinde dikkat çeken dalga halkası */
.sosyal-nabiz::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 9999px;
  background: #25d366;
  opacity: .5;
  animation: sosyal-dalga 2.2s ease-out infinite;
}
@keyframes sosyal-dalga { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }

@media (max-width: 639px) {
  .sosyal-dugme { width: 3rem; height: 3rem; }
  .sosyal-etiket { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sosyal-nabiz::before { animation: none; display: none; }
  .sosyal-dugme { transition: none; }
}
