/*
 * Alpine Style - Single Post Template CSS (Simplified)
 * =====================================
 * Lighter, cleaner, more impactful design with reduced gaps
 */

/* ==========================================================================
   Base Single Post Layout
   ========================================================================== */

   .single-post-main {
    padding-top: 0;
    background-color: #f8f9fa; /* Light grey background for the page */
}

.single-post-main .container {
    max-width: 1140px;
}

/* ==========================================================================
   Hero Section (Simplified)
   ========================================================================== */

.single-post-hero-section {
    position: relative;
    padding: 60px 0;
    min-height: auto;
    background-color: #fff;
    text-align: center;
}

.single-post-hero-section.light-hero {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.light-hero .post-category-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.light-hero .post-title,
.light-hero .post-meta-info {
    color: #fff;
}

.post-hero-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 20px;
}

/* Post Meta Header */
.post-meta-header {
    margin-bottom: 20px;
}

.post-categories {
    margin-bottom: 15px;
}

.post-category-badge {
    display: inline-block;
    background: #e0192e;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin: 0 5px 5px 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-category-badge:hover {
    background-color: #1B1B1B;
    color: #fff;
    transform: translateY(-2px);
}

.post-meta-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.post-meta-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta-info i {
    opacity: 0.8;
}

.post-title {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 700;
    color: #1B1B1B;
    margin: 0;
    line-height: 1.25;
}

/* ==========================================================================
   Content Section (Simplified)
   ========================================================================== */

.single-post-content-section {
    padding: 40px 0 60px 0;
    position: relative;
}

/* Sticky Share Links - Vertical Layout */
.post-share-sticky {
    position: fixed;
    top: calc(50% + 70px);
    inset-inline-end: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 15px 10px;
    border: 1px solid #e9ecef;
}

.share-sticky-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.share-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-align: center;
    /* writing-mode: vertical-lr; */
    text-orientation: mixed;
    /* margin-bottom: 8px; */
}

.post-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #ced4da;
    color: #495057;
    background-color: #fff;
    font-size: 16px;
}

.share-btn:hover {
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-facebook:hover { background-color: #1877f2; }
.share-twitter:hover { background-color: #1da1f2; }
.share-whatsapp:hover { background-color: #25d366; }
.share-linkedin:hover { background-color: #0077b5; }
.share-copy:hover { background-color: #6c757d; }
.share-copy.copied { background-color: #28a745; color: #fff; border-color: #28a745; }

/* Content Wrapper - No Background/Shadow */
.post-content-wrapper {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    border: none;
}

/* Content Typography */
.post-content {
    font-size: 17px;
    line-height: 1.7;
    color: #343a40;
    margin-bottom: 30px;
}

.post-content h2, .post-content h3, .post-content h4 {
    color: #1B1B1B;
    font-weight: 600;
}

.post-content h2 {
    font-size: 28px;
    margin: 30px 0 15px 0;
}

.post-content h3 {
    font-size: 22px;
    margin: 25px 0 12px 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
}

.post-content blockquote {
    background: #f8f9fa;
    border-right: 3px solid #e0192e;
    padding: 20px 25px;
    margin: 25px 0;
    font-style: italic;
    font-size: 18px;
    border-radius: 0 8px 8px 0;
}

/* Post Tags */
.post-tags {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.tags-list {
    gap: 8px;
}

.tag-link {
    background: #e9ecef;
    color: #495057;
    padding: 6px 14px;
    font-size: 13px;
}

.tag-link:hover {
    background: #e0192e;
    color: #fff;
}

/* ==========================================================================
   Sidebar Layout
   ========================================================================== */

.post-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    bottom: 30px;
    margin: auto;
}

.related-posts-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    padding: 25px;
    border: 1px solid #e9ecef;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #1B1B1B;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0192e;
}

.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-post-sidebar-item {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 15px;
}

.related-post-sidebar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post-sidebar-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-post-sidebar-link:hover {
    transform: translateX(-5px);
}

.related-post-sidebar-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.related-post-sidebar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-sidebar-link:hover .related-post-sidebar-image img {
    transform: scale(1.1);
}

.related-post-sidebar-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-post-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #1B1B1B;
    line-height: 1.4;
    margin: 0 0 5px 0;
    transition: color 0.3s ease;
}

.related-post-sidebar-date {
    font-size: 12px;
    color: #666;
}

.related-post-sidebar-link:hover .related-post-sidebar-title {
    color: #e0192e;
}

.related-posts-sidebar-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.alpine-button.btn-secondary {
    background: transparent;
    border-color: #e0192e;
    color: #e0192e;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.alpine-button.btn-secondary:hover {
    background: #e0192e;
    color: #fff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Responsive & RTL
   ========================================================================== */

@media (max-width: 991px) {
    .post-share-sticky {
        position: static;
        transform: none;
        margin-bottom: 20px;
        border-radius: 8px;
        padding: 15px;
    }
    
    .share-sticky-wrapper {
        flex-direction: row;
        justify-content: center;
    }
    
    .share-label {
        writing-mode: horizontal-tb;
        margin-bottom: 0;
        margin-left: 0;
    }
    
    .post-share-buttons {
        flex-direction: row;
    }
    
    .post-sidebar {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 767px) {
    .post-content {
        font-size: 16px;
    }
    
    .post-share-buttons {
        gap: 8px;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .related-posts-sidebar {
        padding: 20px;
    }
    
    .related-post-sidebar-image {
        width: 50px;
        height: 50px;
    }
    
    .related-post-sidebar-title {
        font-size: 13px;
    }
}

[dir="rtl"] .post-content blockquote {
    border-right: none;
    border-left: 3px solid #e0192e;
}

[dir="rtl"] .related-post-sidebar-link:hover {
    transform: translateX(5px);
}

[dir="rtl"] .post-share-sticky {
    inset-inline-end: auto;
    inset-inline-start: 20px;
}

