/* Post Hero */
.post-hero {
    background: var(--light);
    padding: 40px 0;
    border-bottom: 1px solid #e5e7eb;
}

.post-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.post-breadcrumb a {
    color: var(--gray);
    text-decoration: none;
}

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

.post-breadcrumb i {
    color: var(--gray);
    font-size: 10px;
}

.post-hero h1 {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.post-meta-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.author-name {
    font-weight: 600;
    color: var(--dark);
}

.post-date {
    color: var(--gray);
    font-size: 14px;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
}

.share-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Post Content */
.post-content-section {
    padding: 60px 0;
}

.post-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.post-layout.no-sidebar {
    grid-template-columns: 1fr;
    max-width: 800px;
}

/* Table of Contents */
.post-toc {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.toc-widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.toc-widget ul {
    list-style: none;
}

.toc-widget li {
    margin-bottom: 10px;
}

.toc-widget a {
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.toc-widget a:hover {
    color: var(--primary);
}

/* Post Body */
.post-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
}

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

.post-body {
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
}

.post-body h2 {
    font-size: 32px;
    margin: 40px 0 20px;
    color: var(--dark);
}

.post-body h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: var(--dark);
}

.post-body p {
    margin-bottom: 20px;
}

.post-intro {
    margin-bottom: 40px;
}

.post-intro .lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: #4b5563;
    line-height: 1.8;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
    display: flex;
    gap: 15px;
}

.info-box i {
    color: var(--primary);
    font-size: 24px;
    flex-shrink: 0;
}

.warning-box {
    background: #fef2f2;
    border-left: 4px solid var(--danger);
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
    display: flex;
    gap: 15px;
}

.warning-box i {
    color: var(--danger);
    font-size: 24px;
    flex-shrink: 0;
}

.cards-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.comparison-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.comparison-card h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

.comparison-card ul {
    list-style: none;
}

.comparison-card li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.comparison-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
}

.numbered-list {
    counter-reset: step-counter;
    list-style: none;
    margin: 30px 0;
}

.numbered-list li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    padding-left: 50px;
    position: relative;
}

.numbered-list li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.tip-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px;
}

.tip-card i {
    color: var(--secondary);
    font-size: 24px;
    margin-bottom: 10px;
}

.tip-card h4 {
    margin-bottom: 10px;
}

.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin: 40px 0;
}

.cta-box h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.cta-box p {
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 30px;
    background: var(--light);
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
}

.author-avatar-large {
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    flex-shrink: 0;
}

.author-bio h4 {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 5px;
}

.author-bio h3 {
    margin-bottom: 10px;
}

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

.author-social a {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    text-decoration: none;
}

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

/* Related Posts */
.related-posts {
    margin-top: 60px;
}

.related-posts h3 {
    font-size: 28px;
    margin-bottom: 30px;
}

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

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-image {
    height: 150px;
}

.related-image .image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.related-card h4 {
    padding: 20px;
    padding-bottom: 10px;
    font-size: 18px;
}

.related-card .read-more {
    padding: 0 20px 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    
    .post-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Reset geral para mobile */
    .post-content-section {
        width: 100%;
        margin: 0;
        padding: 30px 0;
    }
    
    .post-content-section .container {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }
    
    .post-layout {
        padding: 0;
        margin: 0;
    }
    
    .post-content {
        width: 100%;
        padding: 0;
    }
    
    .post-hero {
        padding: 20px 0;
    }
    
    .post-hero h1 {
        font-size: 28px;
    }
    
    .post-hero-content {
        padding: 0 15px;
    }
    
    .post-featured-image {
        margin: 0 0 30px 0;
        border-radius: 0;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .post-breadcrumb {
        flex-wrap: wrap;
    }
    
    .post-meta-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .post-content-section {
        padding: 30px 0;
    }
    
    .post-body {
        font-size: 16px;
        padding: 0 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        overflow-x: hidden;
    }
    
    .post-body h2 {
        font-size: 24px;
        margin: 30px 0 15px;
    }
    
    .post-body h3 {
        font-size: 20px;
        margin: 25px 0 10px;
    }
    
    .post-body img {
        max-width: 100%;
        height: auto;
    }
    
    .info-box,
    .warning-box {
        margin: 20px 0;
        padding: 15px;
        flex-direction: column;
        text-align: left;
    }
    
    .info-box i,
    .warning-box i {
        font-size: 20px;
    }
    
    .cards-comparison {
        grid-template-columns: 1fr;
        margin: 20px 0;
    }
    
    .comparison-card {
        padding: 15px;
    }
    
    .numbered-list li {
        padding-left: 40px;
    }
    
    .numbered-list li:before {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        margin: 20px 0;
    }
    
    .tip-card {
        padding: 15px;
    }
    
    .cta-box {
        padding: 25px 15px;
        margin: 30px 0;
    }
    
    .cta-box h3 {
        font-size: 22px;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
        margin: 30px 0;
    }
    
    .author-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 32px;
        margin: 0 auto;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .related-posts {
        margin-top: 40px;
        padding: 0 15px;
    }
    
    .related-posts h3 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Fix para tables */
    .post-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        max-width: 100%;
    }
    
    /* Fix para pre/code blocks */
    .post-body pre {
        overflow-x: auto;
        max-width: 100%;
    }
    
    .post-body code {
        word-break: break-word;
    }
    
    /* Fix para listas longas */
    .post-body ul,
    .post-body ol {
        padding-left: 20px;
    }
    
    /* Fix para elementos que possam ultrapassar */
    .post-body * {
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix específico para parágrafos longos */
    .post-body p {
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Fix para headlines longas */
    .post-body h1,
    .post-body h2,
    .post-body h3,
    .post-body h4,
    .post-body h5,
    .post-body h6 {
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Fix para links longos */
    .post-body a {
        word-break: break-all;
        overflow-wrap: break-word;
    }
    
    /* Fix adicional para containers */
    .post-content {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .post-layout.no-sidebar {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Força largura máxima em todos elementos de conteúdo */
    .post-content-section * {
        max-width: 100%;
        box-sizing: border-box;
    }
}