/**
 * Modern Evden Eve Nakliyat
 * SEO & Mobil Uyumluluk Optimizasyonları
 * Core Web Vitals & AdWords Uyumluluğu
 * Son güncelleme: 2025-12-17
 */

/* ====================================
   1. CORE WEB VITALS - LCP, FID, CLS
   ==================================== */

/* CLS (Cumulative Layout Shift) Önleme */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
    aspect-ratio: attr(width) / attr(height);
}

/* Lazy loading için placeholder */
img[loading="lazy"] {
    background-color: #f5f5f5;
    min-height: 200px;
}

/* Font yüklenirken layout shift önleme */
html {
    font-display: swap;
}

/* LCP (Largest Contentful Paint) Optimizasyonu */
.slider .bg-section img,
.hero-image,
.page-title .bg-section img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* FID (First Input Delay) Optimizasyonu - Touch Targets */
a, button, input, select, textarea,
.btn, .nav-item, .nav-link,
[role="button"], [type="button"], [type="submit"] {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Tıklanabilir alanlar için padding */
.navbar-nav .nav-item a {
    padding: 12px 16px;
}

/* ====================================
   2. MOBİL UYUMLULUK
   ==================================== */

/* Temel mobil ayarlar */
@media screen and (max-width: 768px) {
    /* Yazı boyutu optimizasyonu */
    html {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        font-size: 16px;
        line-height: 1.6;
        overflow-x: hidden;
    }
    
    /* Başlık boyutları */
    h1, .h1 { font-size: 28px; line-height: 1.2; }
    h2, .h2 { font-size: 24px; line-height: 1.3; }
    h3, .h3 { font-size: 20px; line-height: 1.3; }
    h4, .h4 { font-size: 18px; line-height: 1.4; }
    h5, .h5 { font-size: 16px; }
    h6, .h6 { font-size: 14px; }
    
    /* Container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Navbar mobil optimizasyonu */
    .navbar-brand img {
        max-width: 150px;
        height: auto;
    }
    
    .navbar-toggler {
        padding: 10px;
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Slider/Hero mobil */
    .slider .slide-content {
        padding: 20px;
    }
    
    .slide-headline {
        font-size: 24px !important;
        line-height: 1.3;
    }
    
    /* Section padding mobil */
    section {
        padding: 50px 0;
    }
    
    /* Form elemanları mobil */
    .form-control {
        font-size: 16px;
        padding: 12px 15px;
        min-height: 48px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
    
    /* Butonlar mobil */
    .btn {
        padding: 12px 24px;
        font-size: 16px;
        min-height: 48px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Tablo responsive */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Footer mobil */
    .footer-widget {
        margin-bottom: 30px;
    }
    
    /* Bottom nav için padding */
    body {
        padding-bottom: 100px;
    }
}

/* Tablet optimizasyonları */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
    
    h1, .h1 { font-size: 36px; }
    h2, .h2 { font-size: 30px; }
    h3, .h3 { font-size: 26px; }
    
    .container {
        max-width: 95%;
    }
    
    .navbar-brand img {
        max-width: 180px;
    }
}

/* ====================================
   3. SEO DOSTU ELEMENTLER
   ==================================== */

/* Skip to content link - Erişilebilirlik */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #e11d07;
    color: #fff;
    padding: 10px 20px;
    z-index: 100000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus göstergeleri - Erişilebilirlik */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #e11d07;
    outline-offset: 2px;
}

/* Breadcrumb SEO stillemesi */
.breadcrumb {
    background: transparent;
    padding: 10px 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #e11d07;
}

/* ====================================
   4. ADWORDS / GOOGLE ADS UYUMLULUĞU
   ==================================== */

/* CTA Butonları - Dönüşüm Optimizasyonu */
.btn--primary,
.btn--cta,
.cta-button {
    background: linear-gradient(135deg, #e11d07 0%, #b01705 100%);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(225, 29, 7, 0.3);
    transition: all 0.3s ease;
}

.btn--primary:hover,
.btn--cta:hover {
    background: linear-gradient(135deg, #b01705 0%, #8a1204 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 29, 7, 0.4);
}

/* WhatsApp butonu - Dikkat çekici */
.whatsapp-btn,
.nav-item-whatsapp .main-btn {
    background: #25d366;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Form dönüşüm optimizasyonu */
.contact-panel,
.quote-form,
.teklif-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.contact-panel input:focus,
.contact-panel textarea:focus,
.contact-panel select:focus {
    border-color: #e11d07;
    box-shadow: 0 0 0 3px rgba(225, 29, 7, 0.1);
}

/* Güven sembolleri */
.trust-badge,
.guven-rozeti {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 50px;
    font-size: 14px;
    color: #333;
}

/* ====================================
   5. PERFORMANS OPTİMİZASYONLARI
   ==================================== */

/* GPU hızlandırma */
.slider,
.carousel,
.animate,
.transition {
    will-change: transform;
    transform: translateZ(0);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Lazy load placeholder */
[data-src] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ====================================
   6. PRINT STİLLERİ
   ==================================== */

@media print {
    .bottom-nav,
    .desktop-nav,
    .navbar,
    .backtop,
    .whatsapp-btn,
    .preloader {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* ====================================
   7. YARDIMCI SINIFLAR
   ==================================== */

/* Görünürlük kontrolleri */
.visible-mobile {
    display: none !important;
}

.hidden-mobile {
    display: block !important;
}

@media (max-width: 768px) {
    .visible-mobile {
        display: block !important;
    }
    
    .hidden-mobile {
        display: none !important;
    }
}

/* Metin hizalama mobil */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .text-left-mobile {
        text-align: left !important;
    }
}

/* Flex yardımcıları */
.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }

/* Gap yardımcıları */
.gap-1 { gap: 0.5rem !important; }
.gap-2 { gap: 1rem !important; }
.gap-3 { gap: 1.5rem !important; }
