﻿

.single-blog-hero {
    position: relative;
    z-index: 1;
    padding-top: 10px;
    padding-bottom: 120px;
    background: linear-gradient(135deg, #6c63ff, #4a47d5);
    color: #fff;
    text-align: center;
    border-radius: 0 0 30px 30px; /* گوشه‌های پایین گرد */
}



/* عنوان مقاله */
.single-blog-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.8;
    margin-top: 20px;
}

/* متای مقاله */
.single-blog-meta span {
    margin: 0 10px;
    font-size: 14px;
    opacity: 0.9;
}

/* ===== Wrapper ===== */
.single-blog-content-wrapper {
    max-width: 900px;
    margin: -100px auto 50px;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: block;
    height: auto; /* ارتفاع خودکار */
    overflow: visible; /* نمایش کامل محتوا */
    z-index:3;
    position:relative;
}

/* تصویر شاخص */
.single-blog-cover {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    margin-bottom: 30px;
}

/* محتوای مقاله */
.single-blog-content {
    font-size: 17px;
    line-height: 2;
    color: #444;
    overflow: visible;
    word-break: break-word; /* شکستن کلمات طولانی */
}

    /* همه عناصر داخل محتوا */
    .single-blog-content * {
        overflow: visible !important;
    }

    /* پاراگراف‌ها و تیترها */
    .single-blog-content p {
        margin-bottom: 20px;
    }

    .single-blog-content h2,
    .single-blog-content h3 {
        margin-top: 30px;
        font-weight: 700;
    }

/* clearfix */
.single-blog-content-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== برچسب‌ها ===== */
.single-blog-tags {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.single-blog-tag {
    display: inline-block;
    background: #6c63ff;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: default;
}

    .single-blog-tag:hover {
        background: #514ed0;
        transform: translateY(-2px);
    }


/* ===== Comments ===== */
.comments-section {
    margin-top: 20px;
}

.comment {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}

.comment-header {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.comment-body {
    font-size: 15px;
    color: #333;
    margin-top: 5px;
}

/* ===== فرم ارسال نظر ===== */
.single-blog-send-comment .form-control {
    border-radius: 8px;
    padding: 10px 12px;
}

.single-blog-send-comment .main-btn {
    background-color: #6c63ff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

    .single-blog-send-comment .main-btn:hover {
        background-color: #514ed0;
    }

/* کپچا */
.chaptcha-img {
    max-height: 60px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* ===== انیمیشن نرم ===== */
.single-blog-content-wrapper {
    animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

strong{
    display:inline-block;
}


/* ===== کارت نظرات ===== */
.comments-section .comment {
    background: #fff;
    border-radius: 15px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

    .comments-section .comment:hover {
        transform: translateY(-1px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    }

/* هدر هر نظر */
.comments-section .comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

/* نام نویسنده */
.comments-section .comment-author {
    color: #6c63ff; /* هماهنگ با هدر و tags */
}

/* تاریخ نظر */
.comments-section .comment-date {
    color: #999;
    font-weight: 400;
}

/* متن نظر */
.comments-section .comment-body {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

/* ===== فرم ارسال نظر ===== */
.single-blog-comment-form {
    background: #fff;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    margin-top: 10px;
    transition: all 0.3s ease;
}

    .single-blog-comment-form:hover {
        box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    }

    /* inputs و textarea */
    .single-blog-comment-form .form-control {
        border-radius: 10px;
        border: 1px solid #ddd;
        padding: 12px 15px;
        font-size: 15px;
        margin-bottom: 15px;
        transition: all 0.3s ease;
    }

        .single-blog-comment-form .form-control:focus {
            border-color: #6c63ff; /* هماهنگ با هدر */
            box-shadow: 0 0 8px rgba(108, 99, 255, 0.2);
            outline: none;
        }

    /* دکمه ارسال */
    .single-blog-comment-form .main-btn {
        background-color: #6c63ff;
        color: #fff;
        border-radius: 10px;
        padding: 12px 25px;
        font-weight: 600;
        font-size: 16px;
        transition: all 0.3s ease;
        border: none; /* مطمئن شدن از حذف border هنگام hover */
    }

        .single-blog-comment-form .main-btn:hover {
            background-color: #514ed0;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        }






@media (max-width: 768px) {
    /* حذف محدودیت والدین */
    .single-blog-container,
    .single-blog-section,
    .row.single-blog-container,
    .single-blog-hero .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* Hero */
    .single-blog-hero {
        width: 100%; /* پرکردن کل عرض والد */
        padding-top: 20px;
        padding-bottom: 120px;
        border-radius: 0 0 20px 20px;
        box-sizing: border-box;
        margin-top:100px;
    }

    /* Wrapper محتوا */
    .single-blog-content-wrapper {
        width: auto; /* اجازه دهید با margin auto وسط شود */
        margin: -100px 15px 50px; /* فاصله از بالا و کناره‌ها */
        padding: 25px;
        box-sizing: border-box;
        min-height: 500px;
    }

    .single-blog-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .single-blog-meta {
        font-size: 12px;
    }
  
  
}
@media (max-width: 768px) {
    /* والدین کلمات کلیدی و نظرات */
    .keywords,
    .comments,
    .single-blog-tags,
    .comments-section {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important; /* فاصله پایین */
        padding: 0 15px !important; /* فاصله از کناره‌ها */
        box-sizing: border-box;
       
    }

  
}


.comments-section .comment-body {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap; /* نگه داشتن فضاها و شکستن خط در صورت نیاز */
    word-break: break-word; /* شکستن کلمات طولانی */
    overflow-wrap: anywhere; /* حتی رشته بدون فاصله هم شکسته شود */
}
