/* ================================================================
   NewsCore Pro — Animasyonlar
   ================================================================ */

/* ── Temel Geçiş Animasyonları ───────────────────────────────── */
@keyframes nc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes nc-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes nc-fade-down {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes nc-fade-left {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes nc-fade-right {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes nc-scale-in {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes nc-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
@keyframes nc-zoom-in {
    from { opacity: 0; transform: scale(.5); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Hero Slayt Animasyonları ────────────────────────────────── */
.nc-anim-fade-up {
    opacity: 0;
    transform: translateY(20px);
}
.swiper-slide-active .nc-anim-fade-up {
    animation: nc-fade-up .6s cubic-bezier(.4,0,.2,1) forwards;
}
.nc-anim-delay-1 { animation-delay: .15s !important; }
.nc-anim-delay-2 { animation-delay: .3s  !important; }
.nc-anim-delay-3 { animation-delay: .45s !important; }
.nc-anim-delay-4 { animation-delay: .6s  !important; }

/* ── Kaydırma Animasyonu (IntersectionObserver) ──────────────── */
.nc-anim-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .55s cubic-bezier(.4,0,.2,1), transform .55s cubic-bezier(.4,0,.2,1);
}
.nc-anim-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Sıralı animasyon için gecikme */
.nc-grid .nc-anim-on-scroll:nth-child(2) { transition-delay: .08s; }
.nc-grid .nc-anim-on-scroll:nth-child(3) { transition-delay: .16s; }
.nc-grid .nc-anim-on-scroll:nth-child(4) { transition-delay: .24s; }
.nc-grid .nc-anim-on-scroll:nth-child(n+5) { transition-delay: .32s; }

/* ── Kart Hover Animasyonları ────────────────────────────────── */
.nc-card {
    will-change: transform, box-shadow;
}
.nc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, var(--nc-primary) 0%, var(--nc-accent) 100%);
    transition: opacity .3s ease;
    z-index: 0;
    pointer-events: none;
}
.nc-card:hover::before { opacity: .04; }

/* Görsel yakınlaştırma */
.nc-card:hover .nc-card__img { transform: scale(1.07); }

/* ── Flash Haber Ticker Animasyonları ────────────────────────── */
@keyframes nc-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes nc-ticker-fade {
    0%, 5%   { opacity: 0; transform: translateY(8px); }
    15%, 85% { opacity: 1; transform: translateY(0); }
    95%, 100%{ opacity: 0; transform: translateY(-8px); }
}
@keyframes nc-ticker-slide {
    0%, 5%   { opacity: 0; transform: translateX(20px); }
    15%, 85% { opacity: 1; transform: translateX(0); }
    95%, 100%{ opacity: 0; transform: translateX(-20px); }
}
.nc-ticker--scroll .nc-ticker__track { animation: nc-ticker-scroll linear infinite; }
.nc-ticker--scroll:hover .nc-ticker__track { animation-play-state: paused; }

/* ── Sayfa Geçiş Efektleri ───────────────────────────────────── */
.nc-page-transition { animation: nc-fade-in .4s ease; }

/* ── Archive Header Animasyonu ───────────────────────────────── */
.nc-archive-header.nc-anim-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: nc-fade-up .5s ease forwards;
}

/* ── Öne Çıkan Grid Animasyonu ───────────────────────────────── */
.nc-featured-grid__item {
    opacity: 0;
    animation: nc-fade-in .5s ease forwards;
}
.nc-featured-grid__item:nth-child(1) { animation-delay: .05s; }
.nc-featured-grid__item:nth-child(2) { animation-delay: .1s; }
.nc-featured-grid__item:nth-child(3) { animation-delay: .15s; }
.nc-featured-grid__item:nth-child(4) { animation-delay: .2s; }
.nc-featured-grid__item:nth-child(5) { animation-delay: .25s; }

/* ── Mobil Menü Animasyonu ───────────────────────────────────── */
.nc-mobile-menu { transition: transform .35s cubic-bezier(.4,0,.2,1); }

/* ── Arama Overlay Animasyonu ────────────────────────────────── */
.nc-search-overlay { transition: opacity .3s ease, visibility .3s ease; }
.nc-search-overlay.is-open .nc-search-form { animation: nc-fade-down .4s ease; }
.nc-search-overlay.is-open .nc-search-results { animation: nc-fade-up .5s ease .1s both; }

/* ── Yükleme Shimmer (Skeleton) ──────────────────────────────── */
@keyframes nc-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.nc-skeleton {
    background: linear-gradient(90deg, var(--nc-border) 25%, var(--nc-bg) 50%, var(--nc-border) 75%);
    background-size: 200% 100%;
    animation: nc-shimmer 1.5s infinite;
    border-radius: var(--nc-radius);
}
.nc-skeleton-card { height: 320px; }
.nc-skeleton-thumb { height: 200px; }
.nc-skeleton-text { height: 14px; margin: 8px 0; }
.nc-skeleton-text--short { width: 60%; }

/* ── Back to Top Animasyonu ──────────────────────────────────── */
.nc-back-to-top { transition: opacity .3s, transform .3s, background .2s; }
.nc-back-to-top.is-visible { animation: nc-zoom-in .4s cubic-bezier(.4,0,.2,1); }

/* ── Bildirim Toast ──────────────────────────────────────────── */
@keyframes nc-toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes nc-toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); }
}
.nc-toast {
    position: fixed;
    bottom: 80px;
    right: 24px;
    background: var(--nc-secondary);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--nc-radius);
    font-size: .88rem;
    z-index: 9999;
    animation: nc-toast-in .4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.nc-toast.is-hiding { animation: nc-toast-out .4s ease forwards; }

/* ── Dalgalanma (Ripple) Efekti ──────────────────────────────── */
@keyframes nc-ripple {
    from { transform: scale(0); opacity: .6; }
    to   { transform: scale(4); opacity: 0; }
}
.nc-ripple-container { position: relative; overflow: hidden; }
.nc-ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    animation: nc-ripple .6s ease-out;
    pointer-events: none;
}

/* ── Reduce Motion Erişilebilirlik ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .nc-anim-on-scroll { opacity: 1; transform: none; }
    .nc-anim-fade-up   { opacity: 1; transform: none; }
    .nc-ticker--scroll .nc-ticker__track { animation: none; }
    .nc-hero__bg { transform: none !important; }
}
