/**
 * Styles for Single Post Details Page (post.php)
 * Clean, modern, responsive and 100% dynamic
 */

/* Post Header */
.post-detail-header {
    margin-bottom: 2.5rem;
}

.post-detail-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.35;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .post-detail-title {
        font-size: 1.8rem;
    }
}

.post-author-meta {
    gap: 1rem;
}

.post-author-meta .author-avatar img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.post-meta-details h6 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3748;
}

.post-meta-info {
    font-size: 0.88rem;
    color: #718096;
}

/* Post Share Buttons */
.post-share-buttons {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}

.post-share-buttons .share-label {
    font-size: 0.88rem;
}

.post-share-buttons .share-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    border-width: 1.5px;
}

.post-share-buttons .share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Featured Image - Taller, Sharper & Prominent (أطول وأوضح وبدون أي فراغات) */
.featured-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 16px 45px rgba(13, 148, 136, 0.12);
    border: 1px solid rgba(13, 148, 136, 0.15);
    background: #0f172a;
    min-height: 480px;
    height: clamp(380px, 50vh, 560px);
    width: 100%;
}

.detail-image {
    width: 100%;
    height: 100%;
    min-height: 480px;
    max-height: 560px;
    object-fit: cover;
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    filter: brightness(0.98) contrast(1.02);
    display: block;
    transition: transform 0.65s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.featured-image-container:hover .detail-image {
    transform: scale(1.03);
}

/* تنسيق متوافق خصيصاً مع شاشات iPad Pro 13 (Portrait 1024px / Landscape 1366px) */
@media (min-width: 992px) and (max-width: 1366px) {
    .featured-image-container {
        min-height: 440px;
        height: 460px;
        border-radius: 20px;
    }
    .detail-image {
        min-height: 440px;
        max-height: 460px;
    }
}

@media (max-width: 991.98px) {
    .featured-image-container {
        min-height: 360px;
        height: 400px;
    }
    .detail-image {
        min-height: 360px;
        max-height: 400px;
    }
}

@media (max-width: 575.98px) {
    .featured-image-container {
        min-height: 260px;
        height: 280px;
        border-radius: 16px;
    }
    .detail-image {
        min-height: 260px;
        max-height: 280px;
    }
}

/* Post Content Container */
.post-content {
    background: #ffffff;
    border-radius: 16px;
    font-size: 1.12rem;
    line-height: 2;
    color: #2d3748;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.post-text {
    word-break: break-word;
}

.post-text p {
    margin-bottom: 1.5rem;
}

.post-text img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.post-text h2, .post-text h3, .post-text h4 {
    margin-top: 2.2rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    color: var(--primary-color, #1e88e5);
}

.post-text blockquote {
    background-color: rgba(30, 136, 229, 0.06);
    border-right: 4px solid var(--primary-color, #1e88e5);
    padding: 1.5rem 1.8rem;
    margin: 2rem 0;
    border-radius: 0.6rem;
    font-style: italic;
    color: #4a5568;
}

.post-text ul, .post-text ol {
    margin-bottom: 1.5rem;
    padding-right: 1.8rem;
}

.post-text li {
    margin-bottom: 0.5rem;
}

/* Post Author Card */
.post-author-card {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.04) 0%, rgba(248, 250, 252, 0.9) 100%);
    padding: 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.post-author-card img {
    border: 3px solid #fff;
}

/* Comments Section */
.comments-section {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.comment-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.first-comment {
    border-right: 4px solid var(--primary-color, #1e88e5);
}

.comment-header h5 {
    font-size: 1rem;
    color: #2d3748;
}

.comment-body {
    color: #4a5568;
    line-height: 1.7;
}

.comment-actions .btn {
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 0.3rem 0.9rem;
    transition: all 0.25s ease;
}

.comment-form-section {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 14px;
    border: 1px solid #edf2f7;
}

.reply-item {
    background-color: #ffffff;
    padding: 1.1rem;
    border-radius: 10px;
    margin-top: 1rem;
    border-right: 3px solid var(--primary-color, #1e88e5);
    border: 1px solid #e2e8f0;
}

.reply-form {
    background-color: #ffffff;
    padding: 1.2rem;
    border-radius: 10px;
    border-right: 3px solid var(--primary-color, #1e88e5);
    border: 1px solid #e2e8f0;
}

/* Related Posts Cards */
.related-post-card {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #fff;
}

.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.related-image-wrapper {
    overflow: hidden;
    height: 200px;
    background: #f1f5f9;
}

.related-image-wrapper.no-image-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.related-post-card .card-img-top {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .card-img-top {
    transform: scale(1.08);
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.related-post-card:hover .post-overlay {
    opacity: 1;
}

.post-overlay .btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.post-overlay .btn:hover {
    background-color: var(--primary-color, #1e88e5);
    color: white;
}

/* Bottom Fast Navigation Bar */
.post-navigation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 0;
    z-index: 1020;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.18);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.post-navigation-bar.show {
    transform: translateY(0);
}

.post-nav-link {
    color: #e2e8f0;
    padding: 8px 18px;
    border-radius: 30px;
    transition: all 0.25s ease;
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    max-width: 40%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-nav-link .nav-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-nav-link:hover {
    background-color: var(--primary-color, #1e88e5);
    color: #ffffff;
    transform: translateY(-2px);
}

.post-nav-link.all-posts {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 600;
}

.post-nav-link.all-posts:hover {
    background-color: var(--primary-color, #1e88e5);
}

.post-nav-link.disabled {
    cursor: not-allowed;
    background-color: transparent !important;
}

@media (max-width: 768px) {
    .post-nav-link {
        padding: 6px 12px;
        font-size: 0.82rem;
        max-width: 48%;
    }
}
