/*
 * Lightweight shell styles for single article pages
 * Replaces legacy global style/media/fx-exchange layers on article routes
 */

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: #fcfcfc;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

figure {
    margin: 0;
}

.hide {
    display: none !important;
}

.clear {
    clear: both;
    width: 100%;
    line-height: 0;
    font-size: 0;
}

.clearfix:after {
    content: "";
    display: block;
    clear: both;
    height: 0;
    visibility: hidden;
}

.overflow-hidden {
    overflow: hidden;
}

.fx_wrapper {
    overflow: hidden;
    background-color: #fff;
    max-width: 1171px;
    margin: 0 auto;
}

.fx_container {
    padding-left: 10px;
    padding-right: 10px;
}

.fx_bg {
    background-color: #fff;
}

.designv2-article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
}

.designv2-publication-date {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.designv2-breadcrumbs {
    margin-bottom: 1rem;
}

.designv2-breadcrumbs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.designv2-breadcrumbs li {
    display: flex;
    align-items: center;
}

.designv2-breadcrumbs li:not(:last-child)::after {
    content: '•';
    margin-left: 0.5rem;
    color: #adb5bd;
    font-size: 0.8rem;
}

.designv2-breadcrumbs a {
    color: #007bff;
    text-decoration: none;
}

.designv2-article-title {
    margin: 1rem 0;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.designv2-author-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.designv2-author-meta .author-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333333;
}

.designv2-social-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.designv2-social-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.pagination-container-inner {
    min-height: 18px;
}

.designv2-featured-image {
    margin: 1.5rem 0;
    text-align: center;
    aspect-ratio: 1000 / 667;
    overflow: hidden;
    background: #f4f4f4;
}

.designv2-featured-image img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 8px;
}

#content {
    display: flex;
    align-content: space-between;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0;
}

#content .left_part,
.left_part {
    position: relative;
    float: none;
    width: 100%;
    max-width: 70%;
    flex: 0 0 70%;
    padding-right: 16px;
}

#content .sidebar,
.sidebar {
    position: relative;
    float: none;
    width: 100%;
    max-width: 30%;
    min-width: 300px;
    flex: 0 0 30%;
    margin-left: auto;
    margin-right: auto;
}

#content .sidebar:not(.event-sidebar)[style*="display: none"] ~ .left_part,
#content .sidebar:not(.event-sidebar)[style*="display:none"] ~ .left_part {
    max-width: 100% !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    padding-right: 0 !important;
}

.sidebar:before,
.left_part:before {
    display: none;
}

#go_up {
    position: fixed;
    right: 20px;
    bottom: 30px;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 5px;
    background: rgba(191, 191, 191, 0.6);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s;
    z-index: 20;
}

#go_up.active {
    opacity: 1;
    visibility: visible;
}

#go_up:hover {
    background: rgba(120, 120, 120, 0.75);
}

@media only screen and (max-width: 991px) {
    #content .left_part,
    .left_part {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        padding-right: 0 !important;
    }

    #content .sidebar:not(.event-sidebar),
    .sidebar:not(.event-sidebar) {
        display: none !important;
    }
}

@media only screen and (max-width: 767px) {
    .fx_container {
        padding-left: 15px;
        padding-right: 15px;
    }

    #content .left_part,
    .left_part,
    .sidebar {
        width: auto;
        max-width: 100%;
        padding: 0;
        border: 0;
    }

    body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    }

    .designv2-article-container {
        padding: 0;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    }

    .designv2-article-title {
        margin: 0.85rem 0 0.9rem;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
        font-size: 2rem;
        line-height: 1.15;
        letter-spacing: -0.02em;
        min-height: 4.6rem;
    }

    .designv2-author-meta {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-bottom: 1.1rem;
    }

    .designv2-social-buttons {
        margin-left: 0;
    }

    .designv2-publication-date,
    .designv2-breadcrumbs,
    .designv2-author-meta,
    .designv2-featured-image,
    .itx-category-posts-section,
    .itx-educational-articles-section,
    .itx-editor-recommends-section-new,
    .latest-posts-section-inner,
    .section_offset.editor-recommends-section,
    .section_offset .load-more-focus-single-wrap,
    .section_offset .load-more-recommendate-single-wrap {
        content-visibility: visible;
        contain: none;
    }
}
