/* ================================================================
   AYYILDIZ SPOR — UX & ANIMATION ENHANCEMENTS
   Mevcut stilleri override etmez, üstüne ekler.
================================================================ */

/* ── 1. SCROLL PROGRESS BAR ─────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #b7101c 0%, #df3345 50%, #ff7b89 100%);
  z-index: 1400; /* EN ÜSTTE — tüm modal/overlay'lerin üzerinde */
  transition: width .12s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(193,18,31,.55);
  pointer-events: none;
}

/* ── 2. SAYFA GEÇİŞ OVERLAY ─────────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  background: #060d1e;
  z-index: 1300; /* Scroll progress altında, her şeyin üstünde */
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease;
}
#page-transition.fade-out {
  opacity: 1;
  pointer-events: all;
}

/* ── 3. BACK TO TOP BUTTON ──────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 90px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b7101c, #df3345);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500; /* Sabit UI elemanları katmanı */
  opacity: 0;
  transform: translateY(14px) scale(0.85);
  transition: opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
  box-shadow: 0 4px 18px rgba(193,18,31,.4);
  outline: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 10px 28px rgba(193,18,31,.55);
}
#back-to-top:active {
  transform: translateY(-1px) scale(1.02);
}
#back-to-top svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
@media (max-width: 680px) {
  #back-to-top { bottom: 76px; right: 14px; width: 40px; height: 40px; }
}

/* ── 4. LAZY IMAGE FADE-IN ──────────────────────────────────── */
img.enh-lazy {
  opacity: 0;
  transition: opacity .55s ease;
}
img.enh-lazy.enh-loaded {
  opacity: 1;
}

/* ── 5. SKELETON SHIMMER ────────────────────────────────────── */
.skel {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.04) 25%,
    rgba(255,255,255,.10) 50%,
    rgba(255,255,255,.04) 75%
  );
  background-size: 400% 100%;
  animation: skel-wave 1.65s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skel-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-line     { height: 14px; margin-bottom: 8px; border-radius: 6px; }
.skel-line.sm  { width: 60%; }
.skel-line.md  { width: 80%; }
.skel-line.full{ width: 100%; }
.skel-img      { width: 100%; aspect-ratio: 16/9; border-radius: 12px; }
.skel-avatar   { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.skel-card     {
  padding: 20px;
  background: var(--surface, #141f38);
  border: 1px solid var(--border, rgba(255,255,255,.10));
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── 6. STAGGER REVEAL ──────────────────────────────────────── */
/* Otomatik olarak JS tarafından eklenir */
.enh-stagger {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .48s ease, transform .48s cubic-bezier(.25,.46,.45,.94);
}
.enh-stagger.enh-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Gecikme sınıfları JS tarafından inline style ile verilir */

/* ── 7. ENHANCED CARD HOVER ─────────────────────────────────── */
.card,
.duyuru-card,
.ig-card,
.product-card,
.service-card,
.value-item,
.brans-card,
.stat-box,
.sponsor-card {
  transition:
    transform .30s cubic-bezier(.34,1.36,.64,1),
    box-shadow .30s ease,
    border-color .30s ease !important;
  will-change: transform;
}
.card:hover,
.duyuru-card:hover,
.ig-card:hover,
.product-card:hover,
.service-card:hover,
.value-item:hover,
.brans-card:hover,
.stat-box:hover,
.sponsor-card:hover {
  transform: translateY(-6px) !important;
  box-shadow:
    0 22px 44px rgba(8,14,28,.28),
    0 0 0 1px rgba(193,18,31,.14) !important;
  border-color: rgba(193,18,31,.24) !important;
}

/* ── 8. BUTTON RIPPLE ───────────────────────────────────────── */
.btn-primary,
.btn-submit,
.cta-btn,
.portal-submit-btn,
.brans-btn,
.about-cta-btn {
  position: relative;
  overflow: hidden;
}
.enh-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  transform: scale(0);
  animation: enh-ripple .52s linear;
  pointer-events: none;
}
@keyframes enh-ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ── 9. SECTION ENTRANCE ANIMATION ─────────────────────────── */
.enh-section-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.enh-section-in.enh-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 10. NUMBER COUNTER ─────────────────────────────────────── */
[data-count] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ── 11. IMG ZOOM WRAPPER ───────────────────────────────────── */
.img-zoom-wrap {
  overflow: hidden;
}
.img-zoom-wrap img {
  transition: transform .45s cubic-bezier(.25,.46,.45,.94);
}
.img-zoom-wrap:hover img {
  transform: scale(1.06);
}

/* ── 12. FOCUS VISIBLE ──────────────────────────────────────── */
:focus-visible {
  outline: 2.5px solid rgba(193,18,31,.75);
  outline-offset: 3px;
  border-radius: 5px;
}

/* ── 13. SMOOTH LINK UNDERLINE ──────────────────────────────── */
.footer-links a {
  position: relative;
}
.footer-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 0; height: 1.5px;
  background: #fca311;
  transition: width .22s ease;
}
.footer-links a:hover::after {
  width: 100%;
}

/* ── 14. TOAST NOTIFICATION ─────────────────────────────────── */
#enh-toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200; /* Toast katmanı — modal'ların üstünde */
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.enh-toast {
  background: rgba(20, 31, 56, 0.95);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,.92);
  padding: 11px 22px;
  border-radius: 40px;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  animation: enh-toast-in .35s cubic-bezier(.34,1.56,.64,1) forwards;
  pointer-events: auto;
  white-space: nowrap;
}
.enh-toast.enh-toast-out {
  animation: enh-toast-out .28s ease forwards;
}
@keyframes enh-toast-in {
  from { opacity: 0; transform: translateY(14px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes enh-toast-out {
  to { opacity: 0; transform: translateY(-8px) scale(.9); }
}

/* ── 15. SMOOTH TABLE HOVER ─────────────────────────────────── */
tbody tr {
  transition: background-color .18s ease;
}
tbody tr:hover {
  background: rgba(193,18,31,.06);
}

/* ── REDUCE MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #scroll-progress,
  .enh-stagger,
  .enh-section-in,
  .skel { animation: none !important; transition: none !important; }

  img.enh-lazy { opacity: 1 !important; }

  .card, .duyuru-card, .ig-card, .product-card,
  .service-card, .value-item, .brans-card,
  .stat-box, .sponsor-card {
    transition: none !important;
  }
  .img-zoom-wrap img { transition: none !important; }
  #back-to-top { transition: opacity .15s !important; transform: none !important; }
}
