/* ==========================================================
   post.css  -  Tek blog yazısı okuma sayfası
   Header stilleri header.css'te. Sayfa kuralları .post-page
   altında olduğu için header ile çakışmaz.
   ========================================================== */

:root {
    --post-red-900: #520000;
    --post-red-700: #7f0000;
    --post-red-600: #ba0000;
    --post-text: #2b2b33;
    --post-body: #3f4650;
    --post-muted: #6b7280;
    --post-bg: #f6f7f9;
    --post-card: #ffffff;
    --post-border: #e8eaee;
    --post-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--post-bg);
    color: var(--post-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Okuma ilerleme çubuğu ---------- */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 2000;
    background: linear-gradient(90deg, var(--post-red-600), var(--post-red-900));
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

.post-page {
    position: relative;
    z-index: 0; /* içerik, header menüsünün altında kalır */
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 20px 70px;
}

/* ---------- Başlık alanı ---------- */
.post-page .post-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--post-red-600) 0%, var(--post-red-900) 100%);
    color: #fff;
    padding: 36px 40px 40px;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(82, 0, 0, 0.25);
    animation: postFadeDown 0.7s var(--post-ease) backwards;
}

.post-page .post-hero::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    top: -150px;
    right: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    animation: postFloat 10s ease-in-out infinite;
}

.post-page .breadcrumb {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 0.88rem;
    opacity: 0.9;
}

.post-page .breadcrumb a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.post-page .breadcrumb a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

.post-page .post-title {
    position: relative;
    margin: 0 0 22px 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.post-page .post-meta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-page .meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.88rem;
    backdrop-filter: blur(4px);
}

/* ---------- Yazı kartı ---------- */
.post-page .post-card {
    position: relative;
    margin: 24px 0 0;
    padding: 44px 48px 36px;
    background: var(--post-card);
    border: 1px solid var(--post-border);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 30px rgba(16, 24, 40, 0.08);
    animation: postFadeUp 0.7s var(--post-ease) 0.15s backwards;
}

.post-page .post-content {
    font-size: 1.1rem;
    color: var(--post-body);
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.post-page .post-content p {
    margin: 0 0 1.4em;
}

/* İlk paragraf biraz daha vurgulu */
.post-page .post-content p:first-child {
    font-size: 1.2rem;
    color: var(--post-text);
}

/* ---------- Alt alan ---------- */
.post-page .post-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--post-border);
}

.post-page .post-btn {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--post-red-600), var(--post-red-700));
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.25s var(--post-ease), box-shadow 0.25s ease, filter 0.2s ease;
}

.post-page .post-btn:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 20px rgba(186, 0, 0, 0.3);
    filter: brightness(1.05);
}

/* ---------- Hata kutusu ---------- */
.post-page .post-error {
    margin-top: 20px;
    padding: 56px 28px;
    text-align: center;
    background: var(--post-card);
    border: 1px solid var(--post-border);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 30px rgba(16, 24, 40, 0.08);
    animation: postFadeUp 0.6s var(--post-ease) backwards;
}

.post-page .post-error-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(186, 0, 0, 0.1);
    color: var(--post-red-600);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 56px;
}

.post-page .post-error h1 {
    margin: 0 0 8px;
    color: var(--post-red-900);
}

.post-page .post-error p {
    margin: 0 0 24px;
    color: var(--post-muted);
}

/* ---------- Klavye odağı ---------- */
.post-page a:focus-visible {
    outline: 3px solid rgba(186, 0, 0, 0.35);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Animasyonlar ---------- */
@keyframes postFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
}

@keyframes postFadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
}

@keyframes postFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-18px, 14px); }
}

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
    .post-page {
        padding: 16px 14px 50px;
    }

    .post-page .post-hero {
        padding: 28px 22px 30px;
        border-radius: 16px;
    }

    .post-page .post-card {
        margin: 20px 0 0;
        padding: 28px 22px 26px;
    }

    .post-page .post-content {
        font-size: 1.05rem;
    }

    .post-page .post-content p:first-child {
        font-size: 1.1rem;
    }
}

/* Hareketi azaltmayı tercih eden kullanıcılar için */
@media (prefers-reduced-motion: reduce) {
    .post-page *,
    .post-page *::before,
    .post-page *::after {
        animation: none !important;
        transition: none !important;
    }
}