/* =====================================================
   Crestu.com Performance Optimizations
   Bu dosya async yuklenir (main-head.php: media="print" onload)
   UX'i bozmadan performans iyilestirmeleri saglar.
   ===================================================== */

/* --- Mobilde Animasyonlari Azalt (prefers-reduced-motion) --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Mobilde AOS Animasyonlarini Hafiflet --- */
@media (max-width: 767px) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    [data-aos].aos-animate {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Mobilde will-change kaldır (GPU bellek tasarrufu) */
    [data-aos] {
        will-change: auto !important;
    }
}

/* --- Off-screen content icin content-visibility --- */
.footer,
.footer-top,
.footer-bottom {
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

/* --- Gorselller icin aspect-ratio (CLS onleme) --- */
img:not([width]):not([height]) {
    aspect-ratio: attr(width) / attr(height);
}

/* --- Touch target boyutlari (mobil erisilebilik) --- */
@media (max-width: 767px) {

    a,
    button,
    [role="button"],
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* --- will-change sadece hover/focus'da aktif (masaustu) --- */
@media (min-width: 768px) {

    .btn:hover,
    .card:hover,
    a:hover {
        will-change: transform;
    }
}