/*
Theme Name: Fruitful Child - Deniz Elektronik (Adana TV Tamircisi)
Theme URI: https://www.adanatvtamircisi.com.tr
Description: 2025 Optimizasyonları - Deniz Elektronik Adana TV Tamir için özel child theme
Author: Deniz Elektronik
Author URI: https://www.adanatvtamircisi.com.tr
Template: fruitful
Version: 1.0.2025
*/

/* Modern System Font Stack - Hızlı Yükleme */
body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tüm elementler için box-sizing */
*, *:before, *:after {
    box-sizing: border-box;
}

/* Yatay taşma önleme (mobil için kritik) */
body, html {
    overflow-x: hidden;
    max-width: 100%;
}

/* ============================================================================
   TEST 1: READING TIME CSS
   ============================================================================ */
.reading-time {
    display: inline-block;
    background: #f5f5f5;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #666 !important;
    margin-bottom: 20px;
    border-left: 3px solid #0066cc;
}

@media (max-width: 768px) {
    .reading-time {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* Mobil Call Button - Yeşil */
#deniz-mobile-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: #25D366 !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    text-decoration: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Desktop Call Button - Mavi */
#deniz-desktop-btn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 99998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.4) !important;
    text-decoration: none !important;
    transition: transform 0.3s !important;
    border: none !important;
    padding: 0 !important;
}

#deniz-desktop-btn:hover {
    transform: translateY(-4px) scale(1.1) !important;
}

/* Performans İyileştirmeleri */
img {
    height: auto;
    max-width: 100%;
    image-rendering: -webkit-optimize-contrast;
}

/* Logo için özel optimizasyon (LCP için) */
.site-logo img,
.logo img,
img[src*="adanatvtamir_logo"] {
    content-visibility: auto;
    contain-intrinsic-size: 300px 100px;
}

/* Content Visibility (performans) */
article,
.post,
.entry-content {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* Critical CSS - Above the Fold Optimize */
* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Lazy Load Placeholder */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Hardware Acceleration */
#deniz-mobile-btn,
#deniz-desktop-btn {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Preload Font Display */
@font-face {
    font-display: swap;
}

/* Reduce Motion (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* WebP Support Fallback */
.webp img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Touch Optimization */
a, button {
    -webkit-tap-highlight-color: rgba(0, 102, 204, 0.3);
    touch-action: manipulation;
}

/* Remove 300ms Click Delay */
a, button, input, select, textarea {
    touch-action: manipulation;
}

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

/* Focus Visible (Accessibility) */
:focus-visible {
    outline: 3px solid #0066cc !important;
    outline-offset: 3px !important;
}

/* Button kontrast iyileştirme */
button, 
.button,
input[type="submit"],
input[type="button"] {
    background-color: #0052a3 !important;
    color: #ffffff !important;
    border: 2px solid #0052a3 !important;
    font-weight: 600 !important;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #003d7a !important;
    border-color: #003d7a !important;
}

/* Print Styles */
@media print {
    #deniz-mobile-btn,
    #deniz-desktop-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Mobil Optimizasyon - Profesyonel & Güvenli */
@media (max-width: 768px) {
    /* TEMEL EKRAN SIGDIRMA */
    html {
        overflow-x: hidden;
        width: 100%;
    }
    
    body {
        font-size: 16px;
        line-height: 1.6;
        overflow-x: hidden;
        width: 100% !important;
        margin: 0;
        padding: 0;
    }
    
    /* ANA CONTAINER'LAR - TAM GENİŞLİK */
    .container,
    .page-container,
    #page,
    #main,
    .site-content {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden;
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin: 0 !important;
    }
    
    /* SATIRLAR - TAM GENİŞLİK */
    .row,
    .sixteen.columns,
    .columns {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* İÇERİK ALANLARI - TAM GENİŞLİK */
    .entry-content,
    .post-content,
    article,
    .site,
    .hfeed,
    #page-header {
        max-width: 100% !important;
        width: 100% !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* RESİMLER - Responsive */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* TABLOLAR - Kaydırılabilir */
    table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    /* GENİŞ ELEMENTLER */
    iframe,
    embed,
    object,
    video {
        max-width: 100%;
        height: auto;
    }
    
    /* CODE BLOKLARI */
    pre,
    code {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    /* BAŞLIKLAR - Responsive boyutlar */
    h1 { font-size: 28px; line-height: 1.3; }
    h2 { font-size: 24px; line-height: 1.3; }
    h3 { font-size: 20px; line-height: 1.4; }
    h4 { font-size: 18px; line-height: 1.4; }
    h5 { font-size: 16px; line-height: 1.5; }
    h6 { font-size: 14px; line-height: 1.5; }
    
    /* PARAGRAFLAR - Okunabilirlik */
    p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 16px;
    }
    
    /* LİSTELER */
    ul, ol {
        padding-left: 25px;
    }
    
    /* MOBİL MENÜ BUTONU DÜZELTMESİ */
    .menu_button {
        display: block !important;
        position: relative !important;
        z-index: 9999 !important;
    }
    
    .navbar-toggle {
        display: block !important;
        background: transparent !important;
        border: 2px solid #0066cc !important;
        border-radius: 4px !important;
        padding: 8px 10px !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 9999 !important;
        width: 44px !important;
        height: 44px !important;
    }
    
    .navbar-toggle .icon-bar {
        display: block !important;
        width: 22px !important;
        height: 3px !important;
        border-radius: 2px !important;
        background-color: #0066cc !important;
        margin: 4px 0 !important;
        transition: all 0.3s ease !important;
    }
    
    /* Hamburger açıkken animasyon */
    .navbar-toggle:not(.collapsed) .icon-bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px) !important;
    }
    
    .navbar-toggle:not(.collapsed) .icon-bar:nth-child(2) {
        opacity: 0 !important;
    }
    
    .navbar-toggle:not(.collapsed) .icon-bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px) !important;
    }
    
    /* Menü wrapper */
    .menu_wrapper {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        z-index: 9998 !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    
    .menu_wrapper.in,
    .menu_wrapper:not(.collapse) {
        display: block !important;
    }
    
    /* ERİŞEBİLİRLİK - Touch Targets */
    a, button, input, select, textarea {
        min-height: 44px;
        padding: 10px 14px;
    }
    
    /* LINK KONTRASTLARI */
    a {
        color: #0052a3;
        text-decoration: underline;
    }
    
    a:hover, a:focus {
        color: #003d7a;
        outline: 2px solid #0066cc;
    }
    
    /* BUTONLAR - Mobil Dostu */
    .button,
    button,
    input[type="submit"],
    input[type="button"] {
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
        display: block;
        font-size: 16px;
        padding: 14px 20px;
    }
}
