/**
 * Blog Yazı Detay Sayfası - Premium Tasarım
 * Modern, responsive ve profesyonel blog görünümü
 */

/* ===========================
   CSS Değişkenleri
   =========================== */
:root {
    /* Ana Renkler */
    --post-primary: #6366f1;
    --post-primary-dark: #4f46e5;
    --post-accent: #ec4899;
    --post-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);

    /* Arka Plan Renkleri */
    --post-bg: #0f172a;
    --post-bg-card: #1e293b;
    --post-bg-elevated: #334155;

    /* Metin Renkleri */
    --post-text: #f8fafc;
    --post-text-secondary: #cbd5e1;
    --post-text-muted: #64748b;

    /* Border ve Gölge */
    --post-border: rgba(255, 255, 255, 0.1);
    --post-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    /* Tipografi */
    --post-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --post-font-body: 'Georgia', 'Times New Roman', serif;

    /* Spacing */
    --post-content-width: 720px;
    --post-container-width: 1100px;

    /* Geçişler */
    --post-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Sayfa Yapısı
   =========================== */
.post-page {
    min-height: 100vh;
    background: var(--post-bg);
}

/* Okuma İlerleme Çubuğu */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--post-gradient);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ===========================
   Hero Bölümü
   =========================== */
.post-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0;
    background: var(--post-bg);
}

/* Görsel Container - Resmin tamamını göster */
.post-hero-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.post-hero-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.post-hero:hover .post-hero-image {
    transform: scale(1.02);
    transition: transform 3s ease;
}

/* Görsel üzerine hafif karartma */
.post-hero-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 50%,
            rgba(15, 23, 42, 0.5) 80%,
            var(--post-bg) 100%);
    pointer-events: none;
}

.post-hero-overlay {
    display: none;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--post-container-width);
    margin: 0 auto;
    padding: 40px 24px 50px;
    margin-top: -60px;
}

/* Kategori Badge */
.post-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--post-gradient);
    color: white;
    font-family: var(--post-font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: transform var(--post-transition), box-shadow var(--post-transition);
}

.post-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

/* Başlık */
.post-title {
    font-family: var(--post-font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: white;
    margin: 0 0 24px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Meta Bilgiler */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--post-text-secondary);
    font-family: var(--post-font-heading);
    font-size: 0.9rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta-item i {
    color: var(--post-primary);
    font-size: 0.85rem;
}

/* ===========================
   Ana İçerik Alanı
   =========================== */
.post-main {
    max-width: var(--post-container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    position: relative;
}

/* ===========================
   Makale İçeriği
   =========================== */
.post-content {
    padding: 50px 0;
}

.post-body {
    font-family: var(--post-font-body);
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--post-text-secondary);
}

.post-body>* {
    max-width: var(--post-content-width);
}

/* Paragraflar */
.post-body p {
    margin-bottom: 1.75rem;
}

/* Başlıklar */
.post-body h2 {
    font-family: var(--post-font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--post-text);
    margin: 3rem 0 1.25rem;
    padding-left: 16px;
    border-left: 4px solid var(--post-primary);
    line-height: 1.3;
}

.post-body h3 {
    font-family: var(--post-font-heading);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--post-text);
    margin: 2.5rem 0 1rem;
}

/* Linkler */
.post-body a {
    color: var(--post-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--post-transition);
}

.post-body a:hover {
    color: var(--post-accent);
}

/* Listeler */
.post-body ul,
.post-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-body ul {
    list-style: none;
}

.post-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: var(--post-gradient);
    border-radius: 50%;
}

.post-body ol {
    list-style: none;
    counter-reset: list-counter;
}

.post-body ol li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 0.75rem;
    counter-increment: list-counter;
}

.post-body ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: var(--post-bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--post-font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--post-primary);
}

/* Alıntılar */
.post-body blockquote {
    position: relative;
    margin: 2.5rem 0;
    padding: 24px 30px;
    background: var(--post-bg-card);
    border-left: 4px solid var(--post-primary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--post-text);
}

.post-body blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--post-primary);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Kod Blokları */
.post-body pre {
    margin: 2rem 0;
    padding: 20px 24px;
    background: #0d1117;
    border: 1px solid var(--post-border);
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-body code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.875em;
    padding: 2px 6px;
    background: var(--post-bg-elevated);
    border-radius: 4px;
    color: var(--post-accent);
}

.post-body pre code {
    padding: 0;
    background: none;
    color: #e6edf3;
}

/* Görseller */
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--post-shadow);
}

.post-body figure {
    margin: 2rem 0;
}

.post-body figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--post-text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Tablolar */
.post-body table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    font-family: var(--post-font-heading);
    font-size: 0.9rem;
}

.post-body th,
.post-body td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--post-border);
}

.post-body th {
    background: var(--post-bg-card);
    color: var(--post-text);
    font-weight: 600;
}

.post-body tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* Ayırıcı */
.post-body hr {
    border: none;
    height: 1px;
    background: var(--post-border);
    margin: 3rem 0;
}

/* ===========================
   Etiketler
   =========================== */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--post-border);
}

.post-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--post-bg-card);
    color: var(--post-text-secondary);
    font-family: var(--post-font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 50px;
    border: 1px solid var(--post-border);
    transition: all var(--post-transition);
    text-decoration: none;
}

.post-tag:hover {
    background: var(--post-primary);
    color: white;
    border-color: var(--post-primary);
    transform: translateY(-2px);
}

/* ===========================
   Sidebar
   =========================== */
.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding: 30px 0;
}

.sidebar-widget {
    background: var(--post-bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--post-border);
}

.sidebar-title {
    font-family: var(--post-font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--post-text-muted);
    margin-bottom: 20px;
}

/* Sosyal Paylaşım Widget */
.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    font-family: var(--post-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all var(--post-transition);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.copy-link {
    background: var(--post-bg-elevated);
    border: 1px solid var(--post-border);
}

/* İlgili Yazılar */
.related-post {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--post-border);
    text-decoration: none;
    transition: all var(--post-transition);
}

.related-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post:hover {
    transform: translateX(5px);
}

.related-post-thumb {
    width: 70px;
    height: 55px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--post-bg-elevated);
    flex-shrink: 0;
}

.related-post-info h5 {
    font-family: var(--post-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--post-text);
    margin: 0 0 6px;
    line-height: 1.4;
    transition: color var(--post-transition);
}

.related-post:hover .related-post-info h5 {
    color: var(--post-primary);
}

.related-post-meta {
    font-size: 0.75rem;
    color: var(--post-text-muted);
}

/* ===========================
   Yorumlar Bölümü
   =========================== */
.post-comments {
    max-width: var(--post-container-width);
    margin: 0 auto;
    padding: 60px 24px 80px;
    border-top: 1px solid var(--post-border);
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.comments-header h3 {
    font-family: var(--post-font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--post-text);
    margin: 0;
}

.comments-header i {
    color: var(--post-primary);
    font-size: 1.25rem;
}

.comment-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    background: var(--post-gradient);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
}

/* Yorum Formu */
.comment-form {
    background: var(--post-bg-card);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--post-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
    color: var(--post-text);
    font-family: var(--post-font-heading);
    font-size: 0.95rem;
    transition: all var(--post-transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--post-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
    color: var(--post-text-muted);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    margin-bottom: 20px;
}

.form-submit {
    width: 100%;
    padding: 16px 32px;
    background: var(--post-gradient);
    color: white;
    font-family: var(--post-font-heading);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--post-transition);
}

.form-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Bildirimler */
.form-message {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: var(--post-font-heading);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Yorum Listesi */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    background: var(--post-bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--post-border);
    transition: all var(--post-transition);
}

.comment-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--post-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--post-font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

.comment-author {
    font-family: var(--post-font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--post-text);
    margin: 0;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--post-text-muted);
}

.comment-content {
    color: var(--post-text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===========================
   Mobil Paylaşım Çubuğu
   =========================== */
.mobile-share-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--post-border);
    padding: 12px 20px;
    z-index: 100;
}

.mobile-share-bar .share-buttons {
    flex-direction: row;
    justify-content: space-around;
}

.mobile-share-bar .share-btn {
    padding: 12px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.mobile-share-bar .share-btn span {
    display: none;
}

/* ===========================
   Responsive Tasarım
   =========================== */

/* Tablet (1024px ve altı) */
@media (max-width: 1024px) {
    .post-main {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .post-sidebar {
        display: none;
    }

    .mobile-share-bar {
        display: block;
    }

    .post-comments {
        padding-bottom: 100px;
    }
}

/* Mobil (768px ve altı) */
@media (max-width: 768px) {
    .post-hero {
        min-height: 50vh;
    }

    .post-hero-content {
        padding: 40px 20px 35px;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-category {
        font-size: 0.7rem;
        padding: 6px 14px;
    }

    .post-meta {
        gap: 14px;
        font-size: 0.8rem;
    }

    .post-content {
        padding: 35px 0;
    }

    .post-body {
        font-size: 1.05rem;
        line-height: 1.8;
    }

    .post-body h2 {
        font-size: 1.4rem;
        margin: 2.5rem 0 1rem;
    }

    .post-body h3 {
        font-size: 1.2rem;
    }

    .post-body blockquote {
        padding: 20px;
        margin: 2rem 0;
    }

    .post-body pre {
        padding: 16px;
        font-size: 0.8rem;
    }

    .post-comments {
        padding: 40px 20px 100px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .comment-form {
        padding: 20px;
    }

    .comment-item {
        padding: 18px;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Küçük Mobil (480px ve altı) */
@media (max-width: 480px) {
    .post-hero {
        min-height: 45vh;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .post-meta-item span {
        font-size: 0.7rem;
    }

    .mobile-share-bar .share-btn {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
}

/* ===========================
   Animasyonlar
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.post-category {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.post-title {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.post-meta {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Yazdırma Stilleri */
@media print {

    .mobile-share-bar,
    .post-sidebar,
    .reading-progress,
    .post-comments {
        display: none !important;
    }

    .post-main {
        grid-template-columns: 1fr;
    }

    .post-body {
        color: #000;
        font-size: 12pt;
    }
}