/* style.css — site geneli görünüm. Sade tutuldu, istersen üzerine kolayca oynarız. */

:root {
    --text: #1a1a1a;
    --muted: #666;
    --border: #e2e2e2;
    --accent: #941305;
    --bg: #ffffff;
    --bg-alt: #f7f7f7;
    --max-width: 700px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Sol menü (Daring Fireball tarzı) --- */
body { background: #fafafa; }

.layout {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--border);
}
.sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #CEE1E7;
    color: #ccc;
    padding: 32px 24px;
    text-align: right;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
}
.sidebar .site-title {
    display: block;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    margin-bottom: 28px;
    line-height: 1.3;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sidebar-nav a {
    color: #100f0f;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}
.sidebar-nav a:hover { color: #fff; }

.content-col {
    flex: 1;
    min-width: 0;
}

/* --- Sol menü: arama kutusu --- */
.sidebar-search {
    display: flex;
    margin: 24px 0 0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    overflow: hidden;
}
.sidebar-search input {
    flex: 1;
    min-width: 0;
    background: #222;
    border: none;
    color: #eee;
    padding: 7px 9px;
    font-size: 0.82rem;
    text-align: left;
}
.sidebar-search input::placeholder { color: #777; }
.sidebar-search input:focus { outline: none; background: #2a2a2a; }
.sidebar-search button {
    background: #333;
    border: none;
    color: #ccc;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sidebar-search button:hover { background: #444; color: #fff; }

/* --- Sol menü: bölüm başlıkları (Yakın Zamandakiler, Arşiv) --- */
.sidebar-section {
    margin-top: 26px;
    text-align: left;
}
.sidebar-section h3 {
    color: #100f0f;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    font-weight: 600;
}
.sidebar-section a {
    color: #100f0f;
     text-decoration: none;
}
/* --- Sol menü: Yakın Zamandakiler listesi --- */
.sidebar-recent {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-recent a {
    color: #100f0f;
    text-decoration: none;
    font-size: 0.83rem;
    line-height: 1.35;
    display: block;
}
.sidebar-recent a:hover { color: #fff; }

/* --- Sol menü: yıl/ay arşiv ağacı --- */
.archive-year { margin-bottom: 2px; }
.archive-year summary {
    cursor: pointer;
    color: #100f0f;
    font-size: 0.85rem;
    padding: 5px 0;
    list-style: none;
}
.archive-year summary::-webkit-details-marker { display: none; }
.archive-year summary::before {
    content: "▸";
    display: inline-block;
    width: 14px;
    color: #100f0f;
    font-size: 0.7rem;
}
.archive-year[open] > summary::before { content: "▾"; }
.archive-year summary:hover { color: #fff; }
.archive-year ul {
    list-style: none;
    margin: 2px 0 10px 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.archive-year ul a {
    color: #100f0f;
    text-decoration: none;
    font-size: 0.8rem;
}
.archive-year ul a:hover { color: #fff; }
.archive-count { color: #100f0f; font-size: 0.72rem; }

/* --- Hamburger menü: masaüstünde gizli, sadece mobilde görünür.
   .sidebar-menu-toggle-input, .sidebar-top ve .sidebar-menu ile aynı
   ebeveynin (aside.sidebar) doğrudan çocuklarıdır — checked ~ seçicisinin
   çalışması için bu kardeşlik ilişkisi korunmalı. */
.sidebar-menu-toggle-input { display: none; }

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 30px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}
.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #100f0f;
    border-radius: 2px;
}

@media (max-width: 700px) {
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        text-align: left;
        padding: 20px;
        box-sizing: border-box;
    }
    .sidebar .site-title { margin-bottom: 0; }

    /* Başlık + hamburger ikonu mobilde aynı satırda, iki uçta dursun. */
    .sidebar-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    /* Hamburger ikonu sadece mobilde görünür. */
    .hamburger-btn { display: flex; }

    /* Menü paneli (nav + arama + son yazılar + arşiv) mobilde varsayılan
       kapalı, hamburgera dokununca açılır. Masaüstünde her zaman görünür
       (bu media query dışında .sidebar-menu için ayrı bir kural yok). */
    .sidebar-menu {
        display: none;
        margin-top: 16px;
    }
    .sidebar-menu-toggle-input:checked ~ .sidebar-menu {
        display: block;
    }

    /* Panel açıldığında linkler alt alta, okunaklı şekilde dursun. */
    .sidebar-nav { flex-direction: column; align-items: flex-start; gap: 12px; }
    .sidebar-nav a { white-space: normal; }
}

/* --- Post list --- */
.post-list { margin-top: 32px; }
.post-card {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}
.post-card h2 { margin: 0 0 6px; font-size: 1.4rem; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card-image img { width: 100%; border-radius: 6px; margin-bottom: 12px; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
.post-excerpt { margin: 0 0 10px; }
.read-more { color: var(--accent); text-decoration: none; font-size: 0.95rem; }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 32px 0;
    color: var(--muted);
}
.pagination a { color: var(--accent); text-decoration: none; }

/* --- Referanslar --- */
.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.reference-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.reference-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--bg-alt);
}
.reference-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.reference-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.85rem;
}
.reference-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
}
.reference-status-aktif { background: #e6f7e9; color: #1a7d33; }
.reference-status-kapali { background: #f0f0f0; color: #666; }
.reference-body { padding: 14px 16px; }
.reference-body h2 { font-size: 1.05rem; margin: 0 0 4px; }
.reference-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }
.reference-image { cursor: zoom-in; }

/* --- Referanslar: lightbox (büyük görsel) --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 1000;
    cursor: zoom-out;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
}
.lightbox-title {
    color: #eee;
    margin: 16px 0 0;
    font-size: 0.9rem;
    text-align: center;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
}
.lightbox-close:hover { color: #ccc; }

/* --- Single post --- */
.post-full h1 { font-size: 2rem; margin-bottom: 8px; }
.post-featured-image { width: 100%; border-radius: 6px; margin: 16px 0; }
.post-content { margin-top: 24px; }
.post-content img { max-width: 100%; border-radius: 6px; }
.post-content blockquote {
    border-left: 3px solid var(--border);
    margin-left: 0;
    padding-left: 16px;
    color: var(--muted);
}
.post-content pre {
    background: var(--bg-alt);
    padding: 12px;
    overflow-x: auto;
    border-radius: 4px;
}
.post-content a { color: var(--accent); }

/* --- Archive --- */
.archive-list { list-style: none; padding: 0; }
.archive-list li { padding: 6px 0; border-bottom: 1px dotted var(--border); }
.archive-date { color: var(--muted); font-size: 0.85rem; display: inline-block; width: 130px; }
.archive-list a { color: var(--text); text-decoration: none; }
.archive-list a:hover { color: var(--accent); }

/* --- Comments --- */
.comments { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 24px; }
.comment { margin-bottom: 20px; }
.comment-author { font-weight: 600; margin: 0 0 4px; }
.comment-date { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.comment-content { margin: 0; }

.comment-form { margin-top: 24px; }
.comment-form label { display: block; font-size: 0.9rem; margin-bottom: 4px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}
.comment-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}
.comment-note { color: var(--muted); font-size: 0.85rem; }

/* Honeypot alanı — gerçek kullanıcılara asla görünmemeli */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* --- Flash mesajları --- */
.flash {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 16px 0;
}
.flash-success { background: #e6f7e9; color: #1a7d33; }
.flash-error { background: #fdeaea; color: #b3261e; }

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding: 24px 0;
    color: var(--muted);
    font-size: 0.85rem;
}

/* --- Basit admin login kutusu --- */
.admin-body { background: var(--bg-alt); }
.login-box {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.login-box h1 { font-size: 1.3rem; margin-top: 0; }
.login-box label { display: block; font-size: 0.9rem; margin-bottom: 4px; }
.login-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 4px;
}
.login-box button {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 8px;
}
