/* Advanced Font Display Optimization for better FCP */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/fa-brands-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src: url('../fonts/fa-regular-400.woff2') format('woff2');
}

/* Font loading optimization */
.fa-solid,
.fa-brands,
.fa-regular,
.fa-light,
.fas,
.fab,
.far,
.fal,
.fa {
    font-display: swap !important;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', sans-serif !important;
}

/* Prevent layout shift during font loading */
.fa-solid,
.fas,
.fa {
    font-weight: 900;
}

.fa-brands,
.fab {
    font-weight: 400;
}

.fa-regular,
.far {
    font-weight: 400;
}

.fa-light,
.fal {
    font-weight: 300;
}

/* Lazy loading optimization styles */
.lazy-loading {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.lazy-loaded {
    opacity: 1;
}

.lazy-error {
    opacity: 0.5;
    background: #f0f0f0;
}

/* Touch optimization styles */
.touch-active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Fix deprecated API overflow: visible issue */
img,
video,
canvas {
    overflow: hidden !important;
    max-width: 100%;
    height: auto;
}

/* Image aspect ratio optimization */
.aspect-ratio-fix {
    aspect-ratio: attr(width) / attr(height);
    object-fit: contain;
}

/* Fix horizontal scrollbar and header positioning */
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Ensure header fits properly */
header {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    z-index: 999;
}

.tp-header-2-area {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* Logo - Üst Merkez (Scroll'da Sola Kayar) */
.header-logo-fixed {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    transition: all 0.3s ease !important;
}

/* Scroll yapıldığında logo sola kayar */
.header-logo-fixed.scrolled {
    left: 60px !important;
    transform: translateX(0) !important;
}

.header-logo-fixed a {
    display: inline-block !important;
}

.header-logo-fixed img {
    display: block !important;
    height: auto !important;
    max-width: 180px !important;
    width: 180px !important;
    min-width: 180px !important;
    animation: logoGlow 3s ease-in-out infinite !important;
}

/* Logo parlama efekti - Hareketli ve Saydam */
@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)) brightness(1);
        opacity: 1;
    }

    25% {
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)) brightness(1.05);
        opacity: 0.95;
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.4)) brightness(1.1);
        opacity: 1;
    }

    75% {
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)) brightness(1.05);
        opacity: 0.95;
    }

    100% {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)) brightness(1);
        opacity: 1;
    }
}

/* Hamburger Menü - Sağ Üst Sabit (Sola Kaydırılmış) */
.header-menu-fixed {
    position: fixed !important;
    top: 20px !important;
    right: 100px !important;
    z-index: 9999 !important;
}

.header-menu-fixed button {
    display: flex !important;
    align-items: center !important;
    transform: scale(1.15) !important;
}

.header-menu-fixed .menu-text {
    font-size: 1.05em !important;
}

/* Slider düzeltmeleri - Orijinal CSS/JS'i bozmadan minimum müdahale */
/* Slider'ın diğer içeriklerde görünmemesi için sadece wrapper'a overflow ekle */
.tp-hero-2-wrapper {
    overflow: hidden !important;
    /* Slider içeriğinin taşmasını engelle */
    overflow-y: hidden !important;
    width: 100%;
    max-width: 100vw;
    /* Scrollbar gizleme - Çapraz tarayıcı */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.tp-hero-2-wrapper::-webkit-scrollbar {
    display: none;
}

/* Slider'dan sonra gelen içeriklerin slider üzerine binmemesi için */
.tp-hero-2-wrapper+.des-text-moving-area {
    position: relative;
    z-index: 2;
    /* Slider'ın üzerinde görünmesi için */
}

/* Container width fixes */
.container,
.container-fluid,
.container-1750,
.container-1430,
.container-1230,
.container-1830 {
    max-width: 100%;
    overflow-x: hidden;
}

/* Main content overflow fix */
main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}