/* ================= POST DETAIL PAGE - DARK THEME ================= */

/* --- Post Container --- */
.post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 2rem) 20px 2rem;
}

/* ================= POST HEADER ================= */
.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.post-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    box-shadow: 0 0 15px rgba(197, 164, 126, 0.5);
}

.post-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
}

/* --- Post Meta --- */
.post-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.post-meta-item i {
    color: var(--accent-gold);
    font-size: 1rem;
}

.post-meta-item:hover {
    color: var(--accent-gold);
}

/* --- Post Tag --- */
.post-tag {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(197, 164, 126, 0.3);
    transition: var(--transition);
    display: inline-block;
}

.post-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(197, 164, 126, 0.5);
}

/* ================= POST IMAGE ================= */
.post-img-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Gradient Border Effect */
.post-img-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-gold), transparent, var(--accent-gold-light));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.post-img-container:hover::before {
    opacity: 0.5;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    filter: brightness(0.95);
}

.post-img-container:hover .post-img {
    transform: scale(1.03);
    filter: brightness(1);
}

/* ================= POST CONTENT (RICH TEXT) ================= */
.post-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-body);
    font-family: 'Inter', sans-serif;
}

/* --- Paragraphs --- */
.post-content p {
    margin-bottom: 1.8rem;
    text-align: justify;
}

.post-content p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--accent-gold);
    float: left;
    line-height: 1;
    margin: 0 10px 0 0;
}

/* --- Headings --- */
.post-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    position: relative;
    padding-bottom: 0.8rem;
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
    box-shadow: 0 0 10px rgba(197, 164, 126, 0.5);
}

.post-content h3 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--heading-color);
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    position: relative;
    padding-left: 20px;
}

.post-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--accent-gold), var(--accent-gold-dark));
    border-radius: 2px;
}

.post-content h4 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-gold-light);
    font-weight: 600;
}

/* --- Lists --- */
.post-content ul,
.post-content ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
    color: var(--text-body);
}

.post-content ul li {
    margin-bottom: 1rem;
    position: relative;
    list-style: none;
    padding-left: 1.5rem;
}

.post-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(197, 164, 126, 0.5);
}

.post-content ol {
    counter-reset: list-counter;
}

.post-content ol li {
    margin-bottom: 1rem;
    position: relative;
    list-style: none;
    padding-left: 2rem;
    counter-increment: list-counter;
}

.post-content ol li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-gold);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

/* --- Blockquotes --- */
.post-content blockquote {
    border-left: 4px solid var(--accent-gold);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: var(--text-body);
    background: rgba(197, 164, 126, 0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.post-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    color: var(--accent-gold);
    opacity: 0.3;
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.post-content blockquote p {
    margin-bottom: 0.5rem;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* --- Links --- */
.post-content a {
    color: var(--accent-gold);
    text-decoration: none;
    position: relative;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.post-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(197, 164, 126, 0.5);
}

.post-content a:hover {
    color: var(--accent-gold-light);
}

.post-content a:hover::after {
    width: 100%;
}

/* --- Images in Content --- */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.05);
}

/* --- Code Blocks --- */
.post-content code {
    background: rgba(197, 164, 126, 0.1);
    color: var(--accent-gold);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid var(--accent-gold);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-body);
}

/* --- Horizontal Rule --- */
.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 164, 126, 0.3), transparent);
    margin: 3rem 0;
}

/* --- Tables --- */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.post-content table th {
    background: rgba(197, 164, 126, 0.1);
    color: var(--heading-color);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-gold);
}

.post-content table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-body);
}

.post-content table tr:hover {
    background: rgba(255,255,255,0.02);
}

/* ================= SHARE BUTTONS ================= */
.post-share {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.post-share h3 {
    color: var(--heading-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.share-btn:hover::before {
    transform: scale(1);
}

.share-btn i {
    position: relative;
    z-index: 1;
}

.share-facebook {
    background: rgba(24, 119, 242, 0.1);
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.3);
}

.share-facebook:hover {
    background: #1877F2;
    color: #fff;
    box-shadow: 0 5px 20px rgba(24, 119, 242, 0.4);
    transform: translateY(-3px);
}

.share-twitter {
    background: rgba(29, 161, 242, 0.1);
    color: #1DA1F2;
    border-color: rgba(29, 161, 242, 0.3);
}

.share-twitter:hover {
    background: #1DA1F2;
    color: #fff;
    box-shadow: 0 5px 20px rgba(29, 161, 242, 0.4);
    transform: translateY(-3px);
}

.share-linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077B5;
    border-color: rgba(0, 119, 181, 0.3);
}

.share-linkedin:hover {
    background: #0077B5;
    color: #fff;
    box-shadow: 0 5px 20px rgba(0, 119, 181, 0.4);
    transform: translateY(-3px);
}

.share-whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.3);
}

.share-whatsapp:hover {
    background: #25D366;
    color: #fff;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-3px);
}

/* ================= READING PROGRESS BAR ================= */
.reading-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.05);
    z-index: 999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
    box-shadow: 0 0 10px rgba(197, 164, 126, 0.5);
    transition: width 0.1s ease;
}

/* ================= LOADING STATE ================= */
.content-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.loading-spinner {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================= CONTENT IMAGE WRAPPER ================= */
.content-image-wrapper {
    margin: 2.5rem 0;
    text-align: center;
}

.content-image-wrapper figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ================= TABLE WRAPPER (RESPONSIVE) ================= */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* ================= POST NAVIGATION ================= */
.btn-voltar-container {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.btn-voltar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--bg-secondary);
    color: var(--text-body);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-pill);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-voltar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.btn-voltar:hover::before {
    width: 400px;
    height: 400px;
}

.btn-voltar:hover {
    color: #fff;
    border-color: var(--accent-gold);
    box-shadow: 0 4px 15px rgba(197, 164, 126, 0.3);
    transform: translateY(-2px);
}

.btn-voltar i {
    transition: transform 0.3s ease;
}

.btn-voltar:hover i {
    transform: translateX(-5px);
}

/* ================= POST AUTHOR INFO ================= */
.post-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin: 3rem 0;
    border-left: 4px solid var(--accent-gold);
    box-shadow: var(--shadow-sm);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(197, 164, 126, 0.3);
}

.author-info h4 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.author-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ================= RELATED POSTS ================= */
.related-posts {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.related-posts h3 {
    color: var(--heading-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .post-container {
        padding: 1.5rem 15px;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .post-content {
        font-size: 1.05rem;
    }
    
    .post-content h2 {
        font-size: 1.75rem;
        margin-top: 2.5rem;
    }
    
    .post-content h3 {
        font-size: 1.4rem;
    }
    
    .post-content p:first-of-type::first-letter {
        font-size: 3rem;
    }
    
    .post-img-container {
        max-height: 350px;
    }
    
    .post-author {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .post-header {
        margin-bottom: 2rem;
    }
    
    .post-content {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
        padding-left: 15px;
    }
    
    .post-content blockquote {
        padding: 1rem;
        margin: 2rem -10px;
    }
    
    .post-img-container {
        max-height: 250px;
        margin-bottom: 2rem;
    }
    
    .btn-voltar-container {
        margin-top: 3rem;
    }
}

/* ================= PRINT STYLES ================= */
@media print {
    .post-header,
    .post-content {
        color: #000;
    }
    
    .post-img-container,
    .btn-voltar-container,
    .post-author {
        display: none;
    }
    
    .post-content a {
        color: #000;
        text-decoration: underline;
    }
}
/* ================= POST DETAIL STYLES ================= */

/* Container principal com margin-top */
.post-detail-container {
    margin-top: 120px;
}

/* Header centralizado */
.post-header-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    text-align: center;
    margin-bottom: 2rem;
}

/* Título principal do post */
.post-main-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    line-height: 1;
    color: #fff;
    display: inline-block;
}

/* Meta data - calendário */
.meta-date {
    display: flex;
    align-items: center;
}

.meta-date i {
    color: #a88b68;
    font-size: 1rem;
}

/* Meta data - autor */
.meta-author {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ccc;
    font-size: 0.9rem;
    margin-left: 5px;
}

/* Seção do blog CTA */
.blog-cta-section {
    margin-top: 0;
    padding-top: 0;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .post-main-title {
        font-size: 1.8rem;
    }
    
    .post-header-centered {
        gap: 8px;
    }
    
    .post-detail-container {
        margin-top: 100px;
    }
}

@media (max-width: 480px) {
    .post-main-title {
        font-size: 1.5rem;
    }
    
    .post-detail-container {
        margin-top: 80px;
    }
}