/* ============================================================
   POST PAGE STYLES - İçerik Detay Sayfası
   ============================================================ */

/* ========== LAYOUT ========== */
.post-container {
    max-width: 1200px;
    margin: 0 auto;
}

.post-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.post-main {
    flex: 1;
    min-width: 0;
}

.post-sidebar {
    width: 340px;
    flex-shrink: 0;
}

/* ========== ALERT ========== */
.alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: #fff5f5;
    color: #e74c3c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #c8e6c9;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    color: inherit;
}

.alert-close:hover {
    opacity: 1;
}

/* ========== MAKALE ========== */
.post-article {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.post-premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: #333;
    padding: 5px 15px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
}

.post-title {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

/* ========== META ========== */
.post-meta-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-author-avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.post-author-name:hover {
    color: #667eea;
}

.post-date-info {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.post-quick-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #888;
}

/* ============================================================
   GALERİ - ANA GÖRSEL + THUMBNAIL
   ============================================================ */

.post-gallery {
    margin: 20px 0;
    overflow: hidden;
}

/* ----- ANA BÜYÜK GÖRSEL ----- */
.gallery-main {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f2f5;
    position: relative;
    width: 100%;
}

.gallery-main-item {
    cursor: pointer;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Oranı */
    height: 0;
    overflow: hidden;
    background: #f0f2f5;
}

.gallery-main-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f0f2f5;
    transition: transform 0.3s ease;
}

.gallery-main-item:hover img {
    transform: scale(1.02);
}

/* Ana görsel üzerine "Tıklayarak büyüt" ipucu */
.gallery-main-item::after {
    content: "🔍 Tıklayarak büyüt";
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-main-item:hover::after {
    opacity: 1;
}

/* ----- KÜÇÜK THUMBNAIL'LER ----- */
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 5px;
}

.gallery-thumb-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f2f5;
    aspect-ratio: 1 / 1;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-thumb-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
    z-index: 2;
}

.gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-thumb-item:hover img {
    transform: scale(1.1);
}

/* ============================================================
   İÇERİK
   ============================================================ */
.post-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    padding: 15px 0;
}

.post-content a {
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
}

.post-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ========== ETİKETLER ========== */
.post-tags-section {
    margin: 20px 0;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-tag {
    background: #f0f4ff;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    margin: 2px;
    display: inline-block;
    transition: all 0.2s;
}

.post-tag:hover {
    background: #667eea;
    color: white;
}

/* ========== AKSİYON BUTONLARI ========== */
.post-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
    margin: 15px 0;
}

.action-btn {
    background: #f8f9fa;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    color: #4a627a;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    text-decoration: none;
}

.action-btn:hover,
.action-btn.active {
    background: #ffedf0;
    color: #e74c3c;
}

.action-btn.active {
    background: #667eea;
    color: white;
}

.post-stats-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 15px;
    font-size: 13px;
    color: #888;
}

/* ========== BANLI KULLANICI ========== */
.username-banned {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: #e74c3c;
    opacity: 0.7;
    color: #e74c3c !important;
}

.comment-user-banned {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: #e74c3c;
    opacity: 0.7;
    color: #e74c3c !important;
}

.banned-badge {
    display: inline-block;
    margin-left: 5px;
    font-size: 11px;
    color: #e74c3c;
    cursor: help;
    position: relative;
}

.banned-badge:hover::after {
    content: "Bu kullanıcı uzaklaştırılmıştır";
    position: absolute;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    margin-left: 5px;
    top: -25px;
}

/* ========== YORUMLAR ========== */
.comments-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.comments-title {
    font-size: 22px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Yorum Formu */
.comment-form-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.comment-form-card textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    transition: border 0.2s;
}

.comment-form-card textarea:focus {
    outline: none;
    border-color: #667eea;
}

.comment-form-footer {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.btn {
    padding: 10px 25px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8, #6c3b9a);
    transform: translateY(-2px);
    color: white;
}

/* Yorum Kartları */
.comment-card {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-card:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-user-link {
    text-decoration: none;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.2s;
}

.comment-user-link:hover {
    color: #667eea;
}

.comment-date {
    font-size: 11px;
    color: #aaa;
}

.comment-content {
    margin: 8px 0 0 0;
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.comment-content a {
    color: #667eea;
    text-decoration: none;
}

.comment-content a:hover {
    text-decoration: underline;
}

/* Giriş Yap Uyarısı */
.login-to-comment {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.login-to-comment p {
    margin: 0;
}

.login-to-comment a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.login-to-comment a:hover {
    text-decoration: underline;
}

/* Yorum Yok */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-comments i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.no-comments p {
    margin: 0;
}

/* ========== LIGHTBOX ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    z-index: 100001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

/* ========== 404 ========== */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    max-width: 600px;
    margin: 40px auto;
}

.error-404 i {
    font-size: 64px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-404 h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.error-404 p {
    color: #666;
    margin-bottom: 20px;
}

/* ============================================================
   PREMIUM KİLİT
   ============================================================ */
.premium-locked-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 40px 20px;
}

.premium-locked-card {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.premium-locked-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.icon-crown {
    font-size: 50px;
    display: block;
}

.icon-lock {
    position: absolute;
    bottom: -5px;
    right: -15px;
    font-size: 22px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-locked-card h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.premium-desc {
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
}

.premium-features {
    text-align: left;
    margin: 20px 0 30px;
}

.premium-feature {
    padding: 8px 0;
    color: #444;
    font-size: 14px;
}

.feature-icon {
    margin-right: 10px;
}

.premium-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-premium-upgrade {
    background: linear-gradient(135deg, #ffd700, #f5a623);
    color: #333;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-premium-upgrade:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-back {
    background: #f0f2f5;
    color: #555;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-back:hover {
    background: #e0e0e0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .post-layout {
        flex-direction: column;
    }
    
    .post-main {
        width: 100%;
    }
    
    .post-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .post-article,
    .comments-section {
        padding: 20px 15px;
    }
    
    .post-title {
        font-size: 22px;
    }
    
    .post-meta-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gallery-main-item {
        padding-bottom: 66.66%; /* Mobilde 3:2 oranı */
    }
    
    .gallery-main-item::after {
        font-size: 10px;
        padding: 4px 10px;
        bottom: 10px;
        right: 10px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }
    
    .comment-card {
        gap: 10px;
    }
    
    .comment-avatar-img {
        width: 35px;
        height: 35px;
    }
    
    .post-actions-bar {
        justify-content: center;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .premium-locked-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .post-container {
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .gallery-main-item {
        padding-bottom: 75%; /* Çok küçük ekranlarda 4:3 oranı */
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 4px;
    }
    
    .gallery-thumb-item {
        border-radius: 6px;
    }
    
    .post-article,
    .comments-section {
        padding: 15px;
    }
    
    .comment-card {
    }
    
    .comment-avatar {
        margin-bottom: 5px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
    
    .lightbox-close {
        font-size: 30px;
        top: 15px;
        right: 20px;
    }
    
    .premium-locked-card h2 {
        font-size: 22px;
    }
}

/* Thumbnail'lerde kaydırma (çok fazla görsel varsa) */
.gallery-thumbnails {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar stilleri */
.gallery-thumbnails::-webkit-scrollbar {
    width: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}