/* ============================================
   Blog Post Display Styles
   BEM naming convention for maintainability
   ============================================ */

/* Responsive Breakpoints */
/* Mobile: < 768px */
/* Tablet: 768px - 1023px */
/* Desktop: >= 1024px */

/* ============================================
   Component: Post Detail
   ============================================ */

.post-detail {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Featured Image */
.post-detail__thumbnail {
    margin-bottom: 30px;
}

.post-detail__thumbnail img {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Post Title */
.post-detail__title {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.3;
}

/* Post Metadata */
.post-detail__meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-detail__meta time {
    color: #666;
}

.post-detail__meta .author {
    margin-left: 8px;
}

.post-detail__meta .categories {
    margin-left: 8px;
}

.post-detail__meta .categories a {
    color: #007bff;
    text-decoration: none;
}

.post-detail__meta .categories a:hover {
    text-decoration: underline;
}

/* Post Content - Optimized for Reading */
.post-detail__content {
    font-size: 18px;
    line-height: 1.75;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.post-detail__content p {
    margin-bottom: 1.5em;
}

.post-detail__content h2 {
    font-size: 28px;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.post-detail__content h3 {
    font-size: 24px;
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

/* Post Tags */
.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-tags__label {
    font-weight: 600;
    margin-right: 10px;
}

.post-tags__list {
    display: inline;
}

.post-tags__badge {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    text-decoration: none;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    color: #333;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.post-tags__badge:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* ============================================
   Component: Related Posts
   ============================================ */

.related-posts {
    margin-top: 50px;
}

.related-posts__title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Related Post Card */
.related-posts__card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.related-posts__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Thumbnail */
.related-posts__card-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.related-posts__card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-posts__card-thumbnail--placeholder {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
}

/* Card Content */
.related-posts__card-content {
    padding: 15px;
}

.related-posts__card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-posts__card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.related-posts__card-meta {
    font-size: 12px;
    color: #999;
}

/* Back Button */
.post-detail__back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.post-detail__back-button:hover {
    background: #0056b3;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
    .post-detail {
        padding: 30px 25px;
    }

    .post-detail__thumbnail img {
        max-height: 400px;
    }

    .post-detail__title {
        font-size: 32px;
    }

    .related-posts__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    .post-detail {
        padding: 20px;
        border-radius: 0;
    }

    .post-detail__thumbnail img {
        max-height: 300px;
    }

    .post-detail__title {
        font-size: 28px;
    }

    .post-detail__content {
        font-size: 16px;
        max-width: 100%;
    }

    .post-detail__content h2 {
        font-size: 24px;
    }

    .post-detail__content h3 {
        font-size: 20px;
    }

    .post-detail__meta {
        font-size: 13px;
    }

    .related-posts__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .related-posts__card-thumbnail {
        height: 180px;
    }

    .post-tags__badge {
        display: inline-block;
        margin-right: 8px;
        margin-bottom: 8px;
    }
}
