/**
 * Single Post Premium Layout Styles
 * Author: Robust Tech House / Facilitybot Developer
 */

/* Main Containers */
.fcb-single-post-wrapper {
    max-width: 1180px;
    margin: 40px auto 80px;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Breadcrumbs (Flatsome standard style matching override) */
.fcb-single-breadcrumbs {
    font-size: 12px;
    color: #8c96a8;
    margin-bottom: 30px;
}
.fcb-single-breadcrumbs a {
    color: #8c96a8;
    text-decoration: none;
    transition: color 0.2s;
}
.fcb-single-breadcrumbs a:hover {
    color: var(--fcb-accent-color, #8a0303);
}
.fcb-single-breadcrumbs span {
    margin: 0 8px;
}

/* Title Area */
.fcb-single-header {
    text-align: center;
    margin-bottom: 40px;
}

.fcb-single-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ff6337;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.fcb-single-title {
    font-size: 42px;
    font-weight: 800;
    color: #0d1e3d;
    line-height: 1.25;
    margin: 0 auto 20px;
    max-width: 900px;
}

.fcb-single-excerpt {
    font-size: 18px;
    line-height: 1.5;
    color: #555e70;
    max-width: 800px;
    margin: 0 auto 25px;
}

/* Post Meta */
.fcb-single-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 13px;
    font-weight: 600;
    color: #7a869a;
}

.fcb-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fcb-meta-item svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* Featured Image Layout with Branding Overlay */
.fcb-single-featured-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin: 40px 0 50px;
    box-shadow: 0 20px 40px rgba(13, 30, 61, 0.08);
}

.fcb-single-featured-wrap img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
    max-height: 520px;
}

/* Featured image trapezoid badge matching design */
.fcb-single-featured-branding {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #8a0303;
    padding: 18px 45px 18px 30px;
    clip-path: polygon(0 0, 84% 0, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
}

.fcb-single-featured-branding .fcb-brand-logo {
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Bottom Split Layout */
.fcb-single-post-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: start;
}

/* Left Column: Share bar & Content */
.fcb-single-main-col {
    display: flex;
    position: relative;
}

/* Sticky Share Bar */
.fcb-share-bar {
    position: sticky;
    top: 120px;
    width: 45px;
    margin-right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    align-self: flex-start;
}

.fcb-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d2d9e5;
    border-radius: 50%;
    color: #0d1e3d;
    transition: all 0.25s ease;
    background: #ffffff;
}

.fcb-share-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #ffddd0;
    transform: translateY(-2px);
}

.fcb-share-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.fcb-share-label {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    color: #8c96a8;
    margin-top: 12px;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

/* Article Content Styles */
.fcb-post-content {
    flex-grow: 1;
    font-size: 17px;
    line-height: 1.75;
    color: #0d1e3d;
}

.fcb-post-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0d1e3d;
    margin: 40px 0 20px;
    line-height: 1.3;
}

.fcb-post-content p {
    margin-bottom: 25px;
}

.fcb-post-content ul, .fcb-post-content ol {
    margin: 0 0 30px 24px;
}

.fcb-post-content li {
    margin-bottom: 12px;
}

.fcb-post-content a {
    color: #0084ff;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s;
}

.fcb-post-content a:hover {
    color: var(--fcb-accent-color, #8a0303);
}

.fcb-post-content strong {
    font-weight: 700;
    color: #0d1e3d;
}

/* Right Column: Sidebar Widgets */
.fcb-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 35px;
    position: sticky;
    top: 120px;
}

/* Widget General */
.fcb-sidebar-widget {
    border-radius: 12px;
    box-sizing: border-box;
}

/* Newsletter Widget */
.fcb-sidebar-widget.newsletter-widget {
    background: #f5f8fc;
    padding: 30px 25px;
}

.fcb-sidebar-widget.newsletter-widget h4 {
    font-size: 19px;
    font-weight: 700;
    color: #0d1e3d;
    line-height: 1.35;
    margin: 0 0 10px;
}

.fcb-sidebar-widget.newsletter-widget p {
    font-size: 13px;
    color: #555e70;
    margin: 0 0 20px;
}

.fcb-newsletter-form {
    display: flex;
    flex-direction: column;
}

.fcb-newsletter-form input[type="email"] {
    width: 100%;
    border: 1px solid #d2d9e5;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 15px;
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.fcb-newsletter-form input[type="email"]:focus {
    border-color: #0084ff;
}

.fcb-newsletter-submit {
    width: 100%;
    background: #0084ff;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
    outline: none;
}

.fcb-newsletter-submit:hover {
    background-color: #0066cc;
}

.fcb-newsletter-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
    font-size: 11px;
    font-weight: 700;
    color: #8c96a8;
    text-transform: uppercase;
}

.fcb-newsletter-divider::before, .fcb-newsletter-divider::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background-color: #d2d9e5;
}

.fcb-newsletter-free-btn {
    display: block;
    width: 100%;
    background: #ffffff;
    color: #0d1e3d;
    border: 1.5px solid #0d1e3d;
    border-radius: 24px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.fcb-newsletter-free-btn:hover {
    background-color: #0d1e3d;
    color: #ffffff;
}

/* Success Alert for newsletter demo */
.fcb-newsletter-success {
    display: none;
    background: #e6f6ff;
    border: 1px solid #bce0fd;
    color: #0066cc;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* Table of Contents Widget */
.fcb-sidebar-widget.toc-widget {
    background: #ffffff;
    border: 1px solid #eef1f6;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(13, 30, 61, 0.02);
}

.fcb-toc-title {
    font-size: 16px;
    font-weight: 700;
    color: #0d1e3d;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #eef1f6;
    padding-bottom: 15px;
    user-select: none;
}

.fcb-toc-toggle {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
    fill: currentColor;
}

.fcb-toc-widget.is-closed .fcb-toc-toggle {
    transform: rotate(-90deg);
}

.fcb-toc-content {
    margin-top: 15px;
    transition: all 0.3s ease;
}

.fcb-toc-widget.is-closed .fcb-toc-content {
    display: none;
}

.fcb-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fcb-toc-item a {
    font-size: 13px;
    color: #555e70;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: block;
    line-height: 1.4;
}

.fcb-toc-item a:hover, .fcb-toc-item.active a {
    color: #ff6337;
    font-weight: 600;
    padding-left: 4px;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .fcb-single-post-wrapper {
        margin: 20px auto 40px;
    }

    .fcb-single-title {
        font-size: 32px;
    }

    .fcb-single-post-body {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .fcb-single-main-col {
        flex-direction: column;
    }

    .fcb-share-bar {
        position: static;
        flex-direction: row;
        width: 100%;
        margin-right: 0;
        margin-bottom: 30px;
        justify-content: flex-start;
        border-bottom: 1px solid #eef1f6;
        padding-bottom: 20px;
    }

    .fcb-share-label {
        writing-mode: horizontal-tb;
        transform: none;
        margin-top: 0;
        margin-right: 15px;
    }

    .fcb-single-sidebar {
        position: static;
    }
}
