/**
 * MundoMTB - Single Post Styles
 * 
 * @package MundoMTB
 */

/* ==========================================================================
   ARTICLE LAYOUT
   ========================================================================== */

.single-article {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

@media (max-width: 968px) {
    .single-article {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   ARTICLE HEADER
   ========================================================================== */

.article-header {
    margin-bottom: var(--space-lg);
}

.article-header__tag {
    margin-bottom: var(--space-sm);
}

.article-header__title {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-md);
}

@media (max-width: 768px) {
    .article-header__title {
        font-size: var(--text-2xl);
    }
}

.article-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    color: var(--color-gray-600);
    font-size: var(--text-sm);
}

.article-header__author {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.article-header__author-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.article-header__author-name {
    font-weight: 600;
    color: var(--color-primary);
}

.article-header__date,
.article-header__read-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   FEATURED IMAGE
   ========================================================================== */

.article-featured-image {
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-featured-image__caption {
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    text-align: center;
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--color-gray-100);
}

/* ==========================================================================
   ARTICLE CONTENT
   ========================================================================== */

.article-content {
    max-width: var(--container-narrow);
}

.article-content h2 {
    font-size: var(--text-2xl);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.article-content h3 {
    font-size: var(--text-xl);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.article-content p {
    margin-bottom: var(--space-md);
    font-size: var(--text-lg);
    line-height: 1.8;
}

.article-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: var(--color-accent-hover);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-md);
}

.article-content li {
    margin-bottom: var(--space-xs);
    font-size: var(--text-lg);
    line-height: 1.7;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

.article-content blockquote {
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    border-left: 4px solid var(--color-accent);
    background-color: var(--color-gray-100);
    font-size: var(--text-lg);
    font-style: italic;
}

.article-content img {
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

.article-content figure {
    margin: var(--space-lg) 0;
}

.article-content figcaption {
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    text-align: center;
    margin-top: var(--space-xs);
}

/* ==========================================================================
   ARTICLE FOOTER
   ========================================================================== */

.article-footer {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-gray-300);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.article-tags__label {
    font-weight: 600;
    margin-right: var(--space-xs);
}

/* Share Buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.article-share__label {
    font-weight: 600;
    color: var(--color-gray-600);
}

.article-share__buttons {
    display: flex;
    gap: var(--space-xs);
}

.article-share__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--color-gray-200);
    transition: all var(--transition-fast);
}

.article-share__btn:hover {
    transform: translateY(-2px);
}

.article-share__btn--facebook:hover {
    background-color: #1877F2;
    color: var(--color-white);
}

.article-share__btn--twitter:hover {
    background-color: #1DA1F2;
    color: var(--color-white);
}

.article-share__btn--whatsapp:hover {
    background-color: #25D366;
    color: var(--color-white);
}

.article-share__btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
}

.sidebar-widget {
    background-color: var(--color-gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.sidebar-widget__title {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--color-accent);
}

/* Related Posts Widget */
.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.related-post {
    display: flex;
    gap: var(--space-xs);
}

.related-post__image {
    flex: 0 0 80px;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

.related-post__content {
    flex: 1;
}

.related-post__title {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post__title:hover {
    color: var(--color-accent);
}

.related-post__date {
    font-size: var(--text-xs);
    color: var(--color-gray-500);
    margin-top: 4px;
}

/* ==========================================================================
   AUTHOR BOX
   ========================================================================== */

.author-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background-color: var(--color-gray-100);
    border-radius: var(--radius-lg);
    margin-top: var(--space-xl);
}

@media (max-width: 576px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

.author-box__avatar {
    flex: 0 0 100px;
}

.author-box__avatar img {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.author-box__info {
    flex: 1;
}

.author-box__name {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.author-box__bio {
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.author-box__social {
    display: flex;
    gap: var(--space-xs);
}

@media (max-width: 576px) {
    .author-box__social {
        justify-content: center;
    }
}

/* ==========================================================================
   RELATED ARTICLES
   ========================================================================== */

.related-articles {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-gray-300);
}

.related-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

@media (max-width: 768px) {
    .related-articles__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

.comments-section {
    margin-top: var(--space-2xl);
}

.comments-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-lg);
}

.comment {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-gray-200);
}

.comment__avatar img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
}

.comment__content {
    flex: 1;
}

.comment__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.comment__author {
    font-weight: 600;
}

.comment__date {
    font-size: var(--text-xs);
    color: var(--color-gray-500);
}

.comment__text {
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* Comment Form */
.comment-form {
    margin-top: var(--space-lg);
}

.comment-form__field {
    margin-bottom: var(--space-sm);
}

.comment-form__label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.comment-form__input,
.comment-form__textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast);
}

.comment-form__input:focus,
.comment-form__textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.comment-form__textarea {
    min-height: 150px;
    resize: vertical;
}



/* ########################################################   */



/* SINGLE MUNDO MTB - ajuste para o HTML atual */

.single-post {
    max-width: 1280px;
    margin: 0 auto;
    /* padding: 0 24px; */
}

.single-header {
    display: block;
    max-width: 100%;
}

.single-hero-image {
    width: 100%;
    height: 480px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 28px;
}

.single-hero-image img,
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-header-content .header-container {
    display: block;
    max-width: 100%;
    padding: 0;
}

.single-title {
    font-family: "Oswald", sans-serif;
    font-size: clamp(48px, 5vw, 72px);
    line-height: .92;
    letter-spacing: -1.5px;
    text-align: left;
    margin: 18px 0 20px;
    max-width: 900px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 42px;
    font-size: 15px;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-info {
    text-align: left;
}

.single-content-wrapper {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 0 56px;
}

.content-container {
    max-width: 760px;
    margin: 0 auto;
}

.single-content {
    max-width: 760px;
    font-size: 18px;
    line-height: 1.9;
    color: #2c2c2c;
}

.single-content p {
    margin-bottom: 26px;
}

.single-content img {
    max-width: 100%;
    border-radius: 10px;
}

/* botões flutuantes estilo mobile mock */
.share-floating {
    position: fixed;
    right: 28px;
    bottom: 110px;
    z-index: 50;
}




/* relacionados */
.related-posts {
    max-width: 1180px;
    margin: 24px auto 64px;
    padding: 0 24px;
}

.related-posts .section-title {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 22px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* esconder blocos pesados por enquanto */
.author-box,
.comments-section {
    display: none;
}

@media (min-width: 1024px) {
    .single-post {
        max-width: 1280px;
        margin: 0 auto;
    }


    .single-header-content {
        grid-column: 1 / 2;
        padding: 24px 0 0;
        text-align: left;
        max-width: 100%;
    }

    .single-title {
        font-size: 64px;
        text-align: center;
    }

    .single-content-wrapper {
        display: grid;
        grid-template-columns: minmax(0, 760px) 340px;
        gap: 48px;
    }

    .content-container {
        max-width: 760px;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .single-header {
        margin: 0;
    }

    .single-hero-image {
        height: 360px;
    }

    .single-header-content {
        text-align: left;
        padding: 28px 24px 12px;
    }

    .single-title {
        font-size: 44px;
        line-height: 1.02;
    }

    .single-meta {
        justify-content: flex-start;
    }

    .single-content {
        font-size: 20px;
        line-height: 1.65;
    }

    .share-floating {
        right: 24px;
        bottom: 110px;
    }

    .related-grid {
        display: flex;
        overflow-x: auto;
        gap: 16px;
    }

    .related-grid > * {
        min-width: 170px;
    }
}


.single-share {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.single-share a {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
}

.single-share .facebook { background: #1877f2; }
.single-share .twitter  { background: #1da1f2; }
.single-share .whatsapp { background: #25d366; }

.single-sidebar h3 {
    font-family: "Oswald", "Montserrat", sans-serif;
    font-size: 13px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.related-sidebar-title {
    font-family: "Oswald", "Montserrat", sans-serif;
    font-size: 20px;
    line-height: 1;
}



.site-header .header-container {
    max-width: 1180px;
    height: 88px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header .site-branding {
    flex: 0 0 110px;
}

.site-header .main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.site-header .header-search {
    flex: 0 0 42px;
}


/* SINGLE - alinhamento fino */
.single-post {
    max-width: 1180px;
    margin: 0 auto;
    /* padding: 0 24px; */
}

.single-header {
    max-width: 100%;
    margin: 0 auto;
}

.single-hero-image {
    max-width: 980px;
    height: 460px;
    margin: 24px auto 64px;
    border-radius: 4px;
}

.single-header-content {
    max-width: 820px;
    margin: 0 auto;
}

.single-title {
    max-width: 820px;
    font-size: clamp(48px, 5vw, 72px);
    line-height: .95;
    text-align: center;
    margin-bottom: 22px;
}

.single-excerpt {
    display: block;
    max-width: 760px;
    margin: 0 auto 18px;
    font-size: 17px;
    line-height: 1.5;
    color: #333;
    text-align: left;
}

.single-meta {
    /* justify-content: center; */
    margin-bottom: 42px;
}

.single-content-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

.content-container {
    max-width: 680px;
    margin: 0 auto;
}

.single-content {
    font-size: 20px;
    line-height: 1.8;
}




.single-layout {
    max-width: 1180px;
    margin: 24px auto 64px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 820px) 320px;
    gap: 20px;
    align-items: start;
}   

.single-main {
    min-width: 0;
}

.single-sidebar {
    position: sticky;
    top: 110px;
}

.single-title {
    font-family: "Oswald", "Montserrat", sans-serif;
    font-size: clamp(48px, 5vw, 72px);
    line-height: .92;
    letter-spacing: -1.5px;
    text-align: left;
    margin: 18px 0 20px;
    max-width: 900px;
}

.single-content {
    font-weight: 400;
    font-size: 18px;
    line-height: 1.9;
    color: #2c2c2c;
    max-width: 760px;
}

.sidebar-widget {
    margin-bottom: 36px;
}

.sidebar-widget h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin-bottom: 18px;
}



@media (max-width: 900px) {
    .single-layout {
        display: block;
    }

    .single-sidebar {
        display: none;
    }
}




single-header {
    display: block !important;
    max-width: 1180px !important;
    margin: 24px auto 32px !important;
    padding: 0 24px !important;
}

.single-hero-image {
    display: block !important;
    grid-column: auto !important;
    width: 100% !important;
    max-width: 980px !important;
    height: 460px !important;
    margin: 0 auto !important;
    border-radius: 4px;
    overflow: hidden;
}

.single-hero-image img,
.single-hero-image .hero-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* LAYOUT ABAIXO DA IMAGEM */
.single-layout {
    max-width: 1180px;
    margin: 24px auto 64px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 820px) 320px;
    gap: 20px;
    align-items: start;
}

.single-main {
    min-width: 0;
}

.single-sidebar {
    position: sticky;
    top: 110px;
    background: #f7f7f7;
    padding: 2px;
    border-radius: 8px;    
}


.related-sidebar-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.related-sidebar-thumb img {
    width: 110px;
    height: 82px;
    object-fit: cover;
    border-radius: 4px;
}

.related-sidebar-title {
    font-size: 16px;
    line-height: 1.15;
    margin: 0;
}


.single-layout {
    max-width: 1180px;
    margin: 24px auto 64px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 820px) 320px;
    gap: 20px;
    align-items: start;
}

.single-main {
    min-width: 0;
}

.single-hero-image {
    width: 100% !important;
    max-width: none !important;
    height: 430px !important;
    margin: 0 0 24px !important;
    border-radius: 4px;
    overflow: hidden;
}

.single-hero-image img,
.single-hero-image .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-sidebar {
    position: sticky;
    top: 110px;
}

.single-title {
    font-size: clamp(42px, 3vw, 62px);
    line-height: 1.1;
    text-align: left;
    margin: 22px 0;
}

@media (max-width: 900px) {
    .single-layout {
        display: block;
    }

    .single-sidebar {
        display: none;
    }

    .single-hero-image {
        height: 360px !important;
    }
}


/* Sidebar relacionados - ajuste compacto */
.related-sidebar-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    margin-bottom: 18px;
    align-items: start;
}

.related-sidebar-thumb img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
}

.related-sidebar-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
}

.related-sidebar-title a {
    color: #111;
}

.single-sidebar .sidebar-title {
    font-family: "Oswald", "Montserrat", sans-serif;
    font-size: 26px;
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 22px;
}



.share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    text-decoration: none;
    font-size: 0;

    transition: transform .2s ease, opacity .2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: .9;
}

.share-btn::before {
    font-family: "Font Awesome 6 Brands";
    font-size: 20px;
    font-weight: 400;
}

.share-facebook {
    background: #1877f2;
}

.share-facebook::before {
    content: "\f39e";
}

.share-twitter {
    background: #1da1f2;
}

.share-twitter::before {
    content: "\e61b";
}

.share-whatsapp {
    background: #25d366;
}

.share-whatsapp::before {
    content: "\f232";
}

.share-copy {
    background: #8e8e93;
}

.share-copy::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f0c1";
}

.share-btn {
    font-size: 0;
}

.share-btn::before {
    font-family: "Font Awesome 6 Brands";
    font-size: 20px;
}

.share-facebook::before {
    content: "\f39e";
}

.share-twitter::before {
    content: "\e61b";
}

.share-whatsapp::before {
    content: "\f232";
}
