/**
 * BLOG POST CSS JORNALÍSTICO - EAGLE TELECOM
 * Layout jornalístico otimizado seguindo padrões do site
 * 
 * @version 5.0.0
 * @author Lucas André - Eagle Telecom
 */

/* ========== LAYOUT PRINCIPAL ========== */
.blog-post-page {
    background: var(--background-color);
}

.blog-post-container {
    background: var(--background-color);
    min-height: 100vh;
    padding: 40px 0;
}

/* ========== BARRA DE PROGRESSO DE LEITURA ========== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(224, 58, 60, 0.1);
    z-index: 9999;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff0000);
    width: 0%;
    transition: width 0.3s ease;
}

/* ========== HEADER LIMPO ========== */
.post-header-clean {
    padding: 120px 0 40px;
    background: var(--surface-color);
}

/* ========== BREADCRUMB USANDO ESTILOS DO SITE ========== */
.breadcrumb-simple {
    margin-bottom: 32px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-item a {
    color: var(--nav-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-item a:hover {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: var(--medium-gray);
    font-weight: 500;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: ">";
    color: var(--medium-gray);
    margin: 0 8px;
}

/* ========== META SIMPLES ========== */
.post-meta-simple {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
    padding: 16px 0;
    border-bottom: 1px solid var(--shadow-color);
}

.post-category {
    background: var(--nav-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-date,
.post-author,
.reading-time {
    color: var(--medium-gray);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-date i,
.post-author i,
.reading-time i {
    color: var(--accent-color);
}

/* ========== SEÇÃO DE CONTEÚDO ========== */
.post-content-section {
    padding: 60px 0;
    background: var(--surface-color);
}

/* ========== LAYOUT JORNALÍSTICO ========== */
.journalistic-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 48px;
}

/* ========== COLUNA DA IMAGEM ========== */
.content-image-column {
    position: relative;
}

.sticky-image-container {
    position: sticky;
    top: 120px;
    /* Offset para o header */
    z-index: 1;
}

.featured-image-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.featured-image-container:hover {
    transform: translateY(-2px);
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.15);
}

.featured-image-container img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.featured-image-container:hover img {
    transform: scale(1.02);
}

/* ========== SIDEBAR DE INFORMAÇÕES ========== */
.post-info-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--shadow-color);
}

.post-info-sidebar .info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.post-info-sidebar .info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    background: var(--light-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-info-sidebar .info-item:hover {
    background: rgba(224, 58, 60, 0.05);
    transform: translateY(-1px);
}

.post-info-sidebar .info-item i {
    color: var(--accent-color);
    font-size: 18px;
    margin-bottom: 6px;
}

.post-info-sidebar .info-item span {
    font-weight: 700;
    color: var(--heading-color);
    font-size: 16px;
    line-height: 1;
}

.post-info-sidebar .info-item small {
    font-size: 11px;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* ========== COLUNA DO TEXTO ========== */
.content-text-column {
    min-width: 0;
    /* Permite que o texto quebre corretamente */
}

.content-wrapper {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--default-color);
    margin-bottom: 40px;
}

.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    color: var(--heading-color);
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.content-wrapper h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.content-wrapper h3 {
    font-size: 1.5rem;
    color: var(--nav-color);
    margin-top: 32px;
    margin-bottom: 16px;
}

.content-wrapper p {
    margin-bottom: 18px;
    text-align: justify;
}

.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-wrapper li {
    margin-bottom: 6px;
}

.content-wrapper blockquote {
    background: var(--light-gray);
    border-left: 4px solid var(--accent-color);
    padding: 20px 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--default-color);
    border-radius: 0 8px 8px 0;
}

.content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
    cursor: zoom-in;
    box-shadow: var(--card-shadow);
}

.content-wrapper a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.content-wrapper a:hover {
    color: var(--nav-color);
    text-decoration: underline;
}

/* ========== LAYOUT SEM IMAGEM ========== */
.journalistic-layout.no-image {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

/* ========== TAGS OTIMIZADAS ========== */
.post-tags-section {
    padding: 24px 0;
    border-top: 1px solid var(--shadow-color);
    margin-bottom: 24px;
}

.post-tags-section h6 {
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 12px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: var(--light-gray);
    color: var(--default-color);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--shadow-color);
}

.tag-item:hover {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

/* ========== COMPARTILHAMENTO OTIMIZADO ========== */
.post-share-section {
    padding: 24px 0;
    border-top: 1px solid var(--shadow-color);
}

.post-share-section h6 {
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 16px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

/* CORES DOS BOTÕES DE COMPARTILHAMENTO */
.share-btn.facebook {
    background: #1877f2;
    color: var(--white);
}

.share-btn.facebook:hover {
    background: #166fe5;
    color: var(--white);
    transform: translateY(-1px);
}

.share-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--white);
}

.share-btn.instagram:hover {
    transform: translateY(-1px);
    box-shadow: var(--card-shadow);
}

.share-btn.linkedin {
    background: #0077b5;
    color: var(--white);
}

.share-btn.linkedin:hover {
    background: #006ba1;
    color: var(--white);
    transform: translateY(-1px);
}

.share-btn.whatsapp {
    background: #25d366;
    color: var(--white);
}

.share-btn.whatsapp:hover {
    background: #22c55e;
    color: var(--white);
    transform: translateY(-1px);
}

.share-btn.copy-link {
    background: var(--medium-gray);
    color: var(--white);
}

.share-btn.copy-link:hover {
    background: var(--dark-gray);
    color: var(--white);
    transform: translateY(-1px);
}

/* ========== NAVEGAÇÃO OTIMIZADA ========== */
.post-navigation-section {
    padding: 48px 0;
    background: var(--light-gray);
}

.navigation-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.nav-item {
    display: flex;
}

.nav-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    text-decoration: none;
    color: var(--default-color);
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    width: 100%;
    border: 1px solid var(--shadow-color);
}

.nav-link:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-direction {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.back-to-blog {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: var(--nav-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-to-blog:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ========== POSTS RELACIONADOS OTIMIZADOS ========== */
.related-posts-section {
    padding: 60px 0;
    background: var(--surface-color);
}

.related-posts-section .title-light {
    padding-bottom: 40px;
}

.related-post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--shadow-color);
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.15);
}

.related-post-card .post-image {
    height: 200px;
    overflow: hidden;
}

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

.related-post-card:hover .post-image img {
    transform: scale(1.05);
}

.related-post-card .post-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-post-card .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
}

.related-post-card .category {
    background: var(--nav-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.related-post-card .date {
    color: var(--medium-gray);
    font-weight: 500;
}

.related-post-card h4 {
    margin-bottom: 12px;
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
}

.related-post-card h4 a {
    color: var(--heading-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-post-card h4 a:hover {
    color: var(--accent-color);
}

.related-post-card p {
    color: var(--default-color);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
    font-size: 14px;
}

.related-post-card .read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 14px;
}

.related-post-card .read-more:hover {
    color: var(--nav-color);
    transform: translateX(4px);
}

/* ========== MODAL DE IMAGEM ========== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--accent-color);
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
    box-shadow: var(--card-shadow);
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.journalistic-layout {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVIDADE DO LAYOUT JORNALÍSTICO ========== */
@media (max-width: 1200px) {
    .journalistic-layout {
        grid-template-columns: 350px 1fr;
        gap: 32px;
    }
}

@media (max-width: 992px) {
    .journalistic-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sticky-image-container {
        position: static;
    }

    .content-image-column {
        order: -1;
        /* Imagem vai para cima nomobile */
    }

    .featured-image-container {
        max-width: 600px;
        margin: 0 auto 24px;
    }

    .post-info-sidebar {
        max-width: 600px;
        margin: 0 auto;
    }

    .post-info-sidebar .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .navigation-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .nav-item.center {
        order: -1;
    }

    .post-meta-simple {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .blog-post-container {
        padding: 20px 0;
    }

    .post-header-clean {
        padding: 100px 0 30px;
    }

    .journalistic-layout {
        gap: 24px;
    }

    .post-info-sidebar .info-grid {
        grid-template-columns: 1fr;
    }

    .post-info-sidebar .info-item {
        flex-direction: row;
        text-align: left;
        gap: 12px;
    }

    .post-info-sidebar .info-item i {
        margin-bottom: 0;
        font-size: 16px;
    }

    .post-info-sidebar .info-item span {
        font-size: 14px;
    }

    .post-info-sidebar .info-item small {
        font-size: 10px;
    }

    .content-wrapper {
        font-size: 1rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }

    .nav-link {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .post-meta-simple {
        gap: 8px;
    }

    .tags-list {
        flex-direction: column;
    }

    .tag-item {
        text-align: center;
    }

    .content-wrapper {
        font-size: 1rem;
    }

    .post-info-sidebar {
        padding: 16px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .journalistic-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sticky-image-container {
        position: static;
    }

    .post-info-sidebar,
    .post-share-section,
    .reading-progress,
    .post-navigation-section,
    .related-posts-section {
        display: none !important;
    }

    .content-wrapper {
        font-size: 12pt;
        line-height: 1.5;
    }

    .post-title-clean {
        font-size: 18pt;
        color: black !important;
    }
}