/* ═══════════════════════════════════════════════════════════════════════════
   ingilizce-turkce-ceviri.net - Unified Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ───────────────────────────────────────────────────────── */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #16a34a;
    --error: #dc2626;
    --warning: #f59e0b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --max-width: 1200px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ─── Container ───────────────────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ─── Header ──────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo img { height: 40px; width: auto; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s;
}

/* ─── Main Content ────────────────────────────────────────────────────────── */
.main-content { min-height: calc(100vh - 200px); padding: 24px 0; }

/* ─── Breadcrumbs ─────────────────────────────────────────────────────────── */
.breadcrumbs {
    padding: 12px 0;
    margin-bottom: 20px;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}
.breadcrumbs li::after { content: '›'; margin-left: 8px; }
.breadcrumbs li:last-child::after { content: ''; }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }

/* ─── Translation Engine ──────────────────────────────────────────────────── */
.translation-engine { padding: 30px 0; }
.translation-engine h1 { text-align: center; margin-bottom: 24px; font-size: 1.8rem; }

.language-selector { margin-bottom: 24px; overflow-x: auto; }
.lang-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.lang-tab {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    transition: all 0.2s;
}
.lang-tab:hover, .lang-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.translation-box {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: start;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}
.translation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.lang-label { font-size: 1rem; font-weight: 600; color: var(--primary); }
.input-actions, .output-actions { display: flex; gap: 4px; }
.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}
.btn-icon:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

#sourceText {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 1rem;
    resize: vertical;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}
#sourceText:focus { border-color: var(--primary); }
.char-count { text-align: right; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.translation-swap { display: flex; align-items: center; padding-top: 60px; }
.btn-swap {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, background 0.2s;
}
.btn-swap:hover { transform: rotate(180deg); background: var(--primary-dark); }

.translated-text {
    min-height: 200px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 1rem;
    line-height: 1.6;
}

.dictionary-results {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

/* ─── Blog Layout ─────────────────────────────────────────────────────────── */
.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
.blog-listing h1, .blog-single h1 { margin-bottom: 20px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-bottom: 32px; }
.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-thumbnail img { width: 100%; height: 200px; object-fit: cover; }
.post-card-body { padding: 16px; }
.post-category { font-size: 0.75rem; text-transform: uppercase; color: var(--primary); font-weight: 600; letter-spacing: 0.5px; }
.post-title { font-size: 1.1rem; margin: 8px 0; line-height: 1.4; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--primary); }
.post-excerpt { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.post-meta { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Single Post ─────────────────────────────────────────────────────────── */
.post-content { max-width: 100%; }
.post-header { margin-bottom: 24px; }
.post-header h1 { font-size: 2rem; line-height: 1.3; }
.post-featured-image { margin-bottom: 24px; border-radius: var(--radius-lg); overflow: hidden; }
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.post-body { font-size: 1.05rem; line-height: 1.8; margin-bottom: 24px; }
.post-body p { margin-bottom: 16px; }
.post-body h2, .post-body h3 { margin: 24px 0 12px; }
.post-body img { border-radius: var(--radius); margin: 16px 0; }
.post-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-tags { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-light);
    transition: all 0.2s;
}
.tag:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.post-share { display: flex; gap: 8px; align-items: center; margin: 20px 0; flex-wrap: wrap; }
.share-btn {
    padding: 6px 16px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }

/* Related Posts */
.related-posts { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.related-posts h2 { margin-bottom: 20px; }
.related-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.post-card-small h3 { font-size: 0.9rem; padding: 8px 12px; }
.post-card-small time { padding: 0 12px 12px; display: block; font-size: 0.75rem; color: var(--text-muted); }

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 80px; }
.widget { margin-bottom: 24px; padding: 20px; background: var(--bg-alt); border-radius: var(--radius-lg); }
.widget-title { font-size: 1rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.category-list li { padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.category-list a { color: var(--text); display: flex; justify-content: space-between; font-size: 0.9rem; }
.category-list .count { color: var(--text-muted); font-size: 0.8rem; }
.popular-posts li { padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.popular-posts a { display: flex; gap: 12px; align-items: center; color: var(--text); }
.popular-posts img { width: 60px; height: 60px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.popular-posts .post-title { font-size: 0.85rem; line-height: 1.3; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ─── Alphabet Filter ─────────────────────────────────────────────────────── */
.alphabet-filter { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.letter-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
}
.letter-link:hover, .letter-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination { margin: 32px 0; }
.pagination ul { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination .current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.pagination a:hover { background: var(--primary-light); border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.pagination .dots { display: flex; align-items: center; padding: 0 8px; color: var(--text-muted); }

/* ─── Pages ───────────────────────────────────────────────────────────────── */
.page-content { padding: 20px 0; }
.page-content h1 { margin-bottom: 24px; }
.page-body { line-height: 1.8; font-size: 1.05rem; }
.page-body p { margin-bottom: 16px; }

/* ─── Contact Form ────────────────────────────────────────────────────────── */
.contact-form { max-width: 600px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }
.required { color: var(--error); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
}
.form-row { display: flex; gap: 16px; align-items: end; margin-bottom: 16px; }
.flex-grow { flex: 1; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* ─── Alerts ──────────────────────────────────────────────────────────────── */
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.95rem; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ─── Translation Tools ──────────────────────────────────────────────────── */
.translation-tool { padding: 30px 0; }
.tool-description { color: var(--text-light); margin-bottom: 24px; font-size: 1.05rem; }

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    margin-bottom: 24px;
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-icon { margin-bottom: 16px; color: var(--text-muted); }
.file-label { color: var(--primary); cursor: pointer; font-weight: 500; text-decoration: underline; }

.select-lg { padding: 10px 14px; font-size: 1rem; }
.input-lg { padding: 10px 14px; font-size: 1rem; }

/* ─── Error Page ──────────────────────────────────────────────────────────── */
.error-page { padding: 60px 0; }
.error-content { text-align: center; max-width: 500px; margin: 0 auto; }
.error-content h1 { font-size: 6rem; color: var(--primary); line-height: 1; }
.error-content h2 { font-size: 1.5rem; margin: 12px 0; }
.error-content p { color: var(--text-light); margin-bottom: 24px; }
.error-actions { display: flex; gap: 12px; justify-content: center; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-dark);
    color: #cbd5e1;
    padding: 48px 0 24px;
    margin-top: 48px;
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #94a3b8; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid #1e293b; font-size: 0.85rem; }

/* ─── No Results ──────────────────────────────────────────────────────────── */
.no-results { text-align: center; padding: 48px 0; color: var(--text-muted); font-size: 1.1rem; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 12px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { padding: 12px 16px; }

    .translation-box { grid-template-columns: 1fr; }
    .translation-swap { justify-content: center; padding: 0; }

    .blog-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }

    .post-grid { grid-template-columns: 1fr; }
    .post-header h1 { font-size: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; }

    .form-row { flex-direction: column; }
    .error-actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .lang-tabs { justify-content: flex-start; }
    .container { padding: 0 12px; }
}
