/**
 * Single Post Styles
 *
 * @package foukagroup.com
 */

/* ========================================
   Main Layout
   ======================================== */
.single-post-main-wrapper {
    padding: 30px 0 60px;
    background: var(--color-background-alt);
}

.single-post-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.single-post-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* LTR - Sidebar on Left */
[dir="ltr"] .single-post-container {
    grid-template-columns: 320px 1fr;
}

[dir="ltr"] .single-post-main {
    order: 2;
}

[dir="ltr"] .single-post-sidebar {
    order: 1;
}

/* RTL - Sidebar stays on Right (default grid order) */

/* ========================================
   Main Content Area
   ======================================== */
.single-post-main {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Breadcrumb */
.post-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.post-breadcrumb a {
    color: var(--color-primary, var(--color-primary));
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-breadcrumb a:hover {
    color: var(--color-hover, var(--color-primary-dark));
}

.post-breadcrumb .separator {
    color: var(--color-border);
}

.post-breadcrumb .current {
    color: var(--color-text);
    font-weight: 500;
}

/* Entry Header */
.entry-header {
    margin-bottom: 25px;
}

.entry-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text, var(--color-text));
    margin: 0;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.post-featured-image .featured-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Meta */
.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 20px;
    background: var(--color-background-alt);
    border-radius: 8px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-light);
}

.meta-icon {
    color: var(--color-primary, var(--color-primary));
    flex-shrink: 0;
}

.meta-label {
    color: var(--color-text-muted);
}

.meta-value {
    font-weight: 500;
    color: var(--color-text);
}

/* Author Meta Avatar */
.author-meta-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.author-link {
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.author-link:hover {
    color: var(--color-primary);
}

/* Entry Content */
.entry-content {
    font-size: 17px;
    line-height: 1.9;
    color: var(--color-text);
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text, var(--color-text));
    margin: 1.5em 0 0.8em;
}

.entry-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text, var(--color-text));
    margin: 1.3em 0 0.7em;
}

.entry-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text, var(--color-text));
    margin: 1.2em 0 0.6em;
}

.entry-content ul,
.entry-content ol {
    margin: 1em 0 1.5em 1.5em;
    padding: 0;
}

[dir="rtl"] .entry-content ul,
[dir="rtl"] .entry-content ol {
    margin-left: 0;
    margin-right: 1.5em;
}


.entry-content blockquote {
    margin: 1.5em 0;
    padding: 20px 25px;
    background: var(--color-primary-light, var(--color-primary-light));
    border-right: 4px solid var(--color-primary, var(--color-primary));
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--color-text-light);
}

[dir="ltr"] .entry-content blockquote {
    border-right: none;
    border-left: 4px solid var(--color-primary, var(--color-primary));
    border-radius: 8px 0 0 8px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.entry-content a {
    color: var(--color-primary, var(--color-primary));
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--color-hover, var(--color-primary-dark));
}

/* ========================================
   Tables
   ======================================== */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 15px;
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border, #e9ecef);
}

.entry-content table thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary, var(--color-primary)) 100%);
}

.entry-content table thead tr th,
.entry-content table thead tr td {
    padding: 14px 16px;
    font-weight: 600;
    color: #fff;
    text-align: inherit;
    border: none;
}

.entry-content table tbody tr {
    border-bottom: 1px solid var(--color-border, #e9ecef);
    transition: background 0.2s ease;
}

.entry-content table tbody tr:last-child {
    border-bottom: none;
}

.entry-content table tbody tr:nth-child(even) {
    background: var(--color-background-alt, #f8f9fa);
}

.entry-content table tbody tr:hover {
    background: var(--color-primary-light, rgba(26, 123, 191, 0.08));
}

.entry-content table tbody td {
    padding: 14px 16px;
    color: var(--color-text);
    vertical-align: middle;
    border: none;
}

/* First column (Feature names) - Bold */
.entry-content table tbody td:first-child {
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-background-alt, #f8f9fa);
}

/* Last column highlight (Recommended/Best option) */
.entry-content table thead th:last-child,
.entry-content table thead td:last-child {
    background: rgba(255, 255, 255, 0.15);
}

.entry-content table tbody td:last-child {
    background: var(--color-primary-light, rgba(26, 123, 191, 0.08));
    color: var(--color-primary);
    font-weight: 500;
}

/* Responsive table */
@media screen and (max-width: 768px) {
    .entry-content table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .entry-content table thead tr th,
    .entry-content table thead tr td,
    .entry-content table tbody td {
        padding: 10px 12px;
        white-space: nowrap;
    }
}

/* Post Tags */
.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tags-label {
    font-weight: 600;
    color: var(--color-text);
}

.tag-link {
    display: inline-block;
    padding: 5px 12px;
    background: var(--color-primary-light, var(--color-primary-light));
    color: var(--color-primary, var(--color-primary));
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: var(--color-primary, var(--color-primary));
    color: var(--color-surface);
}

/* ========================================
   Sidebar
   ======================================== */
.single-post-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 40px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--color-text, var(--color-text));
}

.widget-title .title-highlight {
    display: inline-block;
    padding: 9px 24px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 0px 20px;
    font-size: 14px;
}

/* Related Posts List */
.related-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-post-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

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

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

.related-post-link:hover .related-post-title {
    color: var(--color-primary, var(--color-primary));
}

.related-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-info {
    flex: 1;
    min-width: 0;
}

.related-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--color-text, var(--color-text));
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-post-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-light);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-related-posts {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ========================================
   Post FAQ Section
   ======================================== */
.post-faq-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.post-faq-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-faq-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 2px;
}

.post-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-faq-item {
    background: var(--color-background-alt, #f8f9fa);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border, #e9ecef);
    transition: all 0.3s ease;
}

.post-faq-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.post-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.5;
    transition: all 0.3s ease;
}

.post-faq-question:hover {
    color: var(--color-primary);
}

.post-faq-question span {
    flex: 1;
}

.post-faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.post-faq-item.is-open .post-faq-icon {
    transform: rotate(180deg);
}

.post-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.post-faq-item.is-open .post-faq-answer {
    max-height: 1000px;
}

.post-faq-answer > div {
    padding: 0 20px 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-light, #6c757d);
}

.post-faq-answer a {
    color: var(--color-primary);
    text-decoration: underline;
}

.post-faq-answer a:hover {
    color: var(--color-hover);
}

/* ========================================
   Author Box
   ======================================== */
.author-box {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, var(--color-background-alt, #f8f9fa) 0%, var(--color-surface, #fff) 100%);
    border-radius: 16px;
    border: 1px solid var(--color-border, #e9ecef);
}

.author-box-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

.author-box-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.author-avatar a:hover img {
    transform: scale(1.05);
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.author-name a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-name a:hover {
    color: var(--color-primary);
}

.author-job-title {
    font-size: 14px;
    color: var(--color-primary);
    margin: 0 0 12px 0;
    font-weight: 500;
}

.author-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.author-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-light);
    background: var(--color-surface);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
}

.author-stat svg {
    color: var(--color-primary);
}

.author-bio {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-light);
    margin: 0 0 15px 0;
}

.author-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.expertise-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--color-primary-light, rgba(var(--color-primary-rgb), 0.1));
    color: var(--color-primary);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.author-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--color-border);
}

.author-social {
    display: flex;
    gap: 10px;
}

.author-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.author-social .social-link:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.author-social .social-link svg {
    width: 16px;
    height: 16px;
}

.author-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-view-all:hover {
    gap: 12px;
    color: var(--color-hover);
}

[dir="ltr"] .author-view-all svg {
    transform: rotate(180deg);
}

/* ========================================
   Responsive
   ======================================== */
@media screen and (max-width: 992px) {
    .single-post-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    [dir="ltr"] .single-post-container {
        grid-template-columns: 1fr;
    }
    
    [dir="ltr"] .single-post-main,
    [dir="ltr"] .single-post-sidebar {
        order: unset;
    }
    
    .single-post-sidebar {
        position: static;
    }
    
    .entry-title {
        font-size: 26px;
    }
}

@media screen and (max-width: 600px) {
    .single-post-main-wrapper {
        padding: 20px 0 40px;
    }
    
    .single-post-main {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 22px;
    }
    
    .entry-content {
        font-size: 16px;
    }
    
    .post-meta-info {
        flex-direction: column;
        gap: 12px;
    }
    
    .related-post-thumb {
        width: 70px;
        height: 70px;
    }
    
    /* FAQ Section Mobile */
    .post-faq-title {
        font-size: 20px;
    }
    
    .post-faq-question {
        padding: 15px;
        font-size: 15px;
    }
    
    .post-faq-answer > div {
        padding: 0 15px 15px;
        font-size: 14px;
    }
    
    /* Author Box Mobile */
    .author-box {
        padding: 20px;
    }
    
    .author-box-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .author-stats {
        justify-content: center;
    }
    
    .author-expertise {
        justify-content: center;
    }
    
    .author-footer {
        flex-direction: column;
        align-items: center;
    }
}
