/* ====================================
   GOOGLE SEO ENHANCED CSS
   Okunabilirlik + Core Web Vitals
   ==================================== */

/* 1. TİPOGRAFİ - OKUNAB İLİRLİK */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Satoshi", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Heading Hierarchy - Google tarafından önerilen */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 0.875rem;
    color: #1f2937;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #374151;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.625rem;
}

/* Paragraf okunabilirliği */
p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #4b5563;
    max-width: 75ch; /* Optimal okuma genişliği */
}

/* Lead text */
.lead {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #6b7280;
}

/* 2. KONTRAST - WCAG AA Uyumlu */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #2563eb;
    text-decoration: underline;
}

a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Buton erişilebilirliği */
button, .btn {
    min-height: 44px; /* Touch target size */
    min-width: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

button:focus, .btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 3. SEMANTIC HTML İYİLEŞTİRMELERİ */
article, section, aside, nav, header, footer {
    display: block;
}

/* Main content area */
main {
    min-height: 60vh;
    padding: 2rem 0;
}

/* 4. RESİM OPTİMİZASYONU */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy loading görünürlüğü */
img[loading="lazy"] {
    background: #f3f4f6;
}

/* 5. CORE WEB VITALS İYİLEŞTİRMELERİ */

/* Layout Shift Prevention */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* CLS Prevention for images */
.img-container {
    position: relative;
    overflow: hidden;
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 6. SKIP LİNK - ERİŞİLEBİLİRLİK */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* 7. FORM ERİŞİLEBİLİRLİĞİ */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

input, textarea, select {
    font-size: 16px; /* iOS zoom prevention */
    line-height: 1.5;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 8. TABLO OKUNAB İLİRLİĞİ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th {
    background: #f9fafb;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

tr:hover {
    background: #f9fafb;
}

/* 9. LİSTE STİLLERİ */
ul, ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 10. KOD BLOKLARI */
code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Monaco', 'Courier New', monospace;
}

pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* 11. BREADCRUMB */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: #9ca3af;
}

/* 12. FOCUS VİSİBLE - Modern tarayıcılar */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* 13. PRINT STİLLERİ */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
}

/* 14. REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 15. HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    a {
        text-decoration: underline;
    }
    
    button, .btn {
        border: 2px solid currentColor;
    }
}

/* 16. DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* 17. MOBİL OPTİMİZASYON */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    
    /* Touch-friendly spacing */
    button, .btn, a {
        min-height: 48px;
    }
    
    /* Prevent text overflow */
    p, li {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* 18. PERFORMANCE - will-change kullanımı */
.animate-on-scroll {
    will-change: transform, opacity;
}

/* 19. ACCESSIBILITY - 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-width: 0;
}

/* 20. SELECTION COLOR */
::selection {
    background: #3b82f6;
    color: white;
}

::-moz-selection {
    background: #3b82f6;
    color: white;
}

