/**
 * Blog Post Page Styles
 * Professional Article Display Styles
 */

/* Post Hero Section */
.post-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 4rem 0;
    margin-top: 120px;
    border-bottom: 2px solid #e8eef7;
    box-shadow: 0 2px 8px rgba(10, 15, 60, 0.08);
}

.post-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-blue);
    line-height: 1.3;
    letter-spacing: -0.3px;
    margin-bottom: 1.5rem;
}

.post-hero small {
    font-size: 0.95rem;
    color: #7f8c8d;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background-color: rgba(52, 152, 219, 0.08);
    border-radius: 6px;
}

/* Post Section */
.post-section {
    padding: 4rem 0;
    min-height: calc(100vh - 300px);
    background-color: #ffffff;
}

/* Post Image */
.post-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 24px rgba(10, 15, 60, 0.15);
    border: 1px solid #ecf0f1;
    background-color: #f8f9fa;
}

.post-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.post-image:hover img {
    transform: scale(1.02);
}

/* Post Body */
.post-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #34495e;
    word-break: break-word;
}

.post-body p {
    margin-bottom: 1.75rem;
    text-align: right;
    color: #4a5f7f;
}

.post-body .lead {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #ecf3f9;
    border-right: 4px solid #3498db;
    border-radius: 0 8px 8px 0;
    line-height: 1.8;
}

.post-content {
    margin-top: 1.5rem;
    word-wrap: break-word;
}

.post-content p {
    margin-bottom: 1.75rem;
    text-align: right;
    color: #4a5f7f;
}

/* Typography Enhancements */
.post-body h2,
.post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 2.5rem 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ecf0f1;
}

.post-body h3,
.post-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #34495e;
    margin: 2rem 0 0.75rem 0;
}

.post-body strong,
.post-content strong {
    font-weight: 700;
    color: var(--navy-blue);
}

.post-body em,
.post-content em {
    font-style: italic;
    color: #555;
}

.post-body ul,
.post-body ol,
.post-content ul,
.post-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
    padding-right: 0;
}

.post-body li,
.post-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    text-align: right;
}

.post-body blockquote,
.post-content blockquote {
    padding: 1.5rem;
    margin: 1.75rem 0;
    border-right: 4px solid #95a5a6;
    background-color: #f5f7fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #5d6d7b;
    text-align: right;
}

.post-body code,
.post-content code {
    background-color: #f5f7fa;
    color: #e74c3c;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* Post Navigation */
.post-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #ecf0f1;
}

.post-nav a,
.post-nav button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.875rem 1.75rem;
}

.post-nav .btn-outline-primary {
    border: 2px solid var(--navy-blue);
    color: var(--navy-blue);
    background-color: transparent;
}

.post-nav .btn-outline-primary:hover {
    background: var(--navy-blue);
    border-color: var(--navy-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 15, 60, 0.25);
}

.post-nav .btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.post-nav .btn-warning:hover {
    background: #ffb300;
    border-color: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

.post-nav .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.post-nav .btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

/* Horizontal Divider */
hr.my-5 {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e8eef7, transparent);
    margin: 3rem 0;
}

/* Sidebar - Related Posts Widget */
.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.related-posts-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(10, 15, 60, 0.1);
    border: 1px solid #e8eef7;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e8eef7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title i {
    font-size: 1.3rem;
    color: #3498db;
}

.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.related-post-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.related-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post-item:hover {
    transform: translateX(-3px);
}

.related-post-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-image:hover img {
    transform: scale(1.1);
}

.related-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.related-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: var(--navy-blue);
}

.related-post-date {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.related-post-date i {
    font-size: 0.85rem;
}

/* Responsive Styles */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .post-hero {
        margin-top: 100px;
        padding: 3rem 0;
    }

    .post-hero h1 {
        font-size: 2rem;
    }

    .post-section {
        padding: 3rem 1rem;
    }

    .post-image {
        margin-bottom: 2rem;
    }

    .post-body {
        font-size: 1.05rem;
    }

    .post-body .lead {
        font-size: 1.2rem;
        padding: 1.25rem;
    }

    .post-nav a,
    .post-nav button {
        padding: 0.75rem 1.5rem;
    }

    /* Sidebar moves below content on tablet */
    .sidebar-sticky {
        position: static;
        margin-top: 3rem;
    }

    .related-posts-widget {
        padding: 1.25rem;
    }
}

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
    .post-hero {
        margin-top: 80px;
        padding: 2.5rem 1rem;
    }

    .post-hero h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .post-hero small {
        font-size: 0.9rem;
        padding: 0.35rem 0.7rem;
    }

    .post-section {
        padding: 2rem 1rem;
    }

    .post-image {
        margin-bottom: 1.5rem;
        border-radius: 10px;
    }

    .post-body {
        font-size: 1rem;
        line-height: 1.8;
    }

    .post-body .lead {
        font-size: 1.1rem;
        padding: 1rem;
        border-right-width: 3px;
    }

    .post-body h2,
    .post-content h2 {
        font-size: 1.4rem;
        margin: 2rem 0 1rem 0;
    }

    .post-body h3,
    .post-content h3 {
        font-size: 1.2rem;
        margin: 1.75rem 0 0.5rem 0;
    }

    .post-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-nav a,
    .post-nav button {
        width: 100%;
        text-align: center;
        padding: 0.65rem 1rem;
    }

    .post-body blockquote {
        padding: 1rem;
        margin: 1.25rem 0;
    }

    /* Sidebar on mobile */
    .sidebar-sticky {
        margin-top: 2.5rem;
    }

    .related-posts-widget {
        padding: 1rem;
    }

    .widget-title {
        font-size: 1.1rem;
    }

    .related-post-image {
        width: 70px;
        height: 70px;
    }

    .related-post-title {
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile (320px - 575px) */
@media (max-width: 575px) {
    .post-hero {
        margin-top: 70px;
        padding: 2rem 0.75rem;
    }

    .post-hero h1 {
        font-size: 1.4rem;
    }

    .post-section {
        padding: 1.5rem 0.75rem;
    }

    .post-body {
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .post-body .lead {
        font-size: 1rem;
        padding: 0.85rem;
    }

    .post-body h2,
    .post-content h2 {
        font-size: 1.25rem;
    }

    .post-body h3,
    .post-content h3 {
        font-size: 1.1rem;
    }

    hr.my-5 {
        margin: 2rem 0;
    }

    /* Sidebar on extra small mobile */
    .sidebar-sticky {
        margin-top: 2rem;
    }

    .related-posts-widget {
        padding: 0.85rem;
    }

    .widget-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .related-post-item {
        gap: 0.75rem;
        padding-bottom: 1rem;
    }

    .related-post-image {
        width: 60px;
        height: 60px;
    }

    .related-post-title {
        font-size: 0.85rem;
    }

    .related-post-date {
        font-size: 0.75rem;
    }
}
