/**
 * Global CSS Improvements
 * Spacing, Typography, Colors ve Genel İyileştirmeler
 */

/* ============================================
   TYPOGRAPHY İYİLEŞTİRMELERİ
   ============================================ */

/* Daha iyi font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

/* Heading'ler için daha iyi spacing */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.25rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.125rem); }

/* Paragraf spacing */
p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

p:last-child {
    margin-bottom: 0;
}

/* Link iyileştirmeleri */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

a:hover {
    color: var(--color-accent-dark);
}

a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   SPACING SİSTEMİ
   ============================================ */

/* Section spacing */
section {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    section {
        padding: 2rem 0;
    }
}

/* Container spacing */
.container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1440px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Utility spacing classes */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-2 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-3 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-4 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

/* ============================================
   CARD İYİLEŞTİRMELERİ
   ============================================ */

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.card-description {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ============================================
   BUTTON İYİLEŞTİRMELERİ
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-cream-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   FORM İYİLEŞTİRMELERİ
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--color-text-primary);
    background: var(--color-white);
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-tertiary);
}

label {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

/* ============================================
   TABLE İYİLEŞTİRMELERİ
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: 0.75rem;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9375rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border-light);
}

tbody tr:hover {
    background: var(--color-cream-light);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-accent { color: var(--color-accent); }

.bg-white { background: var(--color-white); }
.bg-cream { background: var(--color-cream); }
.bg-cream-light { background: var(--color-cream-light); }

.rounded { border-radius: 0.5rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.shadow-lg { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

/* ============================================
   ANIMATION İYİLEŞTİRMELERİ
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in-up {
    animation: slideInUp 0.6s ease;
}

.scale-in {
    animation: scaleIn 0.4s ease;
}

/* ============================================
   SCROLL İYİLEŞTİRMELERİ
   ============================================ */

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 6px;
    border: 3px solid var(--color-cream-light);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ============================================
   ACCESSIBILITY İYİLEŞTİRMELERİ
   ============================================ */

.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;
}

*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reduced motion için */
@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;
    }
}

/* ============================================
   RESPONSIVE İYİLEŞTİRMELERİ
   ============================================ */

/* Mobil için daha iyi spacing */
@media (max-width: 768px) {
    h1 { margin-bottom: 0.75rem; }
    h2 { margin-bottom: 0.75rem; }
    h3 { margin-bottom: 0.5rem; }
    
    .card {
        padding: 1.25rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
    }
}

/* Tablet için optimizasyon */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Print styles */
@media print {
    .modern-header,
    .site-header,
    .site-footer,
    .btn,
    button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        text-decoration: underline !important;
    }
}
