/*
Theme Name: Yuri Portfolio Theme
Description: Tema premium personalizado baseado no portfólio de Yuri Augusto, com design escuro (Dark Mode), glassmorphism e layout impecável.
Version: 1.1
Author: Yuri Augusto
Text Domain: yuri-portfolio
*/

/* ==========================================================================
   1. CSS Variables & Design Tokens
   ========================================================================== */
   :root {
    /* Colors - Midnight/Slate Theme */
    --color-bg-base: #0F172A;       /* Slate 900 — igual ao site principal */
    --color-bg-surface: rgba(30, 41, 59, 0.4); /* Slate 800 with opacity for glass */
    --color-bg-surface-hover: rgba(30, 41, 59, 0.7);
    --color-bg-card: rgba(15, 23, 42, 0.6);   /* Slate 900 */
    --color-bg-glass: rgba(15, 23, 42, 0.65); /* Header/Sidebar glass */
    
    /* Accents - Cyan / Teal */
    --color-accent: #06B6D4;        /* Cyan 500 */
    --color-accent-hover: #22D3EE;  /* Cyan 400 */
    --color-accent-glow: rgba(6, 182, 212, 0.4);
    
    /* Text */
    --color-text-primary: #F8FAFC;  /* Slate 50 */
    --color-text-secondary: #94A3B8;/* Slate 400 */
    --color-text-muted: #64748B;    /* Slate 500 */
    
    /* Borders */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-signature: 'sweet-peach', cursive;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--color-accent-glow);
    
    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: transparent; /* deixa o spotlight div aparecer atrás */
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* fallback de cor para browsers que não renderizam o spotlight */
html {
    background-color: var(--color-bg-base);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ==========================================================================
   3. Global Elements & Effects
   ========================================================================== */

/* Radial Gradient Background — idêntico ao yurideveloper.com.br */
.bg-spotlight {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 40% 50%, #111F44 0%, #0F172A 70%);
    pointer-events: none;
}

/* Glassmorphism Utility */
.glass-panel {
    background: var(--color-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
}

/* Focus visibility for accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 8px;
    z-index: 9999;
    font-weight: 600;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 1rem;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   4. Layout Structure
   ========================================================================== */

.site-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Mobile Header --- */
.mobile-header {
    display: none;
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 40;
}

.mobile-header .brand-name {
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.mobile-header .brand-title {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-nav {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.mobile-nav-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--color-bg-surface);
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    background: var(--color-accent);
    color: #fff;
}

/* --- Desktop Sidebar --- idêntico ao yurideveloper.com.br */
.sidebar {
    width: 260px;           /* w-[260px] */
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 2rem 1.5rem;   /* py-8 px-6 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 20;            /* z-20 */
    background: transparent; /* bg-transparent */
    border-right: 1px solid #334155; /* border-r border-slate-700 */
}

.sidebar-header {
    margin-bottom: 0;
}

.sidebar .brand-name {
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.25rem;     /* text-4xl */
    font-weight: 800;       /* font-extrabold */
    line-height: 1.1;
    margin-bottom: 0.5rem;  /* mb-2 */
    color: var(--color-text-primary);
}

.sidebar .brand-title {
    font-size: 1rem;        /* text-base */
    color: var(--color-text-primary);
    font-weight: 600;       /* font-semibold */
    margin-bottom: 0.25rem; /* mb-1 */
    letter-spacing: 0;
}

.sidebar .brand-desc {
    color: #94A3B8;         /* text-slate-400 */
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 3rem;    /* mb-12 */
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* space-y-2 */
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    color: #94A3B8;          /* slate-400 — inativo */
    font-weight: 400;         /* normal — só ativo fica bold */
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;   /* pl-3 fixo */
    transition: all 0.2s ease;
    line-height: 1.6;
}

.sidebar-nav-link:hover {
    color: #ffffff;
    border-left-color: #ffffff;
    padding-left: 1.25rem;   /* hover:pl-5 */
}

.sidebar-nav-link.active {
    color: #ffffff;
    font-weight: 700;         /* font-bold só no ativo */
    border-left-color: #ffffff;
    padding-left: 0.75rem;   /* pl-3 — sem indent extra no ativo */
}

.sidebar-footer .social-title {
    font-size: 0.875rem;    /* text-sm */
    font-weight: 600;       /* font-semibold */
    color: #CBD5E1;         /* text-slate-300 */
    margin-bottom: 1rem;    /* mb-4 */
}

.social-links {
    display: flex;
    gap: 1rem;              /* space-x-4 */
    flex-wrap: wrap;
    align-items: center;
}

.social-links a {
    color: #94A3B8;         /* text-slate-400 */
    font-size: 1.5rem;      /* text-2xl */
    background: transparent;
    border: none;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease;
    border-radius: 0;
    padding: 0;
}

.social-links a:hover {
    color: #ffffff;
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Typing cursor animation */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--color-accent);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


/* --- Main Content Area --- */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 3rem 2.5rem;
    min-height: 100vh;
}

/* ==========================================================================
   5. Components (Cards, Buttons, Badges)
   ========================================================================== */

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 2px;
    background: var(--color-accent);
}

/* --- Bento Grid / Posts Layout --- */
.posts-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-lg);
    background: var(--color-bg-surface-hover);
}

.post-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.post-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--color-text-primary);
}

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

.post-card-excerpt {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
}

.read-more-btn i {
    transition: transform var(--transition-fast);
}

.read-more-btn:hover i {
    transform: translateX(4px);
}

/* Grid specifics */
.post-hero {
    grid-column: span 12;
    flex-direction: row; /* Horizontal on desktop */
}

.post-hero .post-card-image {
    width: 50%;
    height: 100%;
    min-height: 350px;
}

.post-hero .post-card-content {
    width: 50%;
    padding: 3rem;
    justify-content: center;
}

.post-hero .post-card-title {
    font-size: 2rem;
}

.post-standard {
    grid-column: span 6;
}

.post-small {
    grid-column: span 4;
}

@media (max-width: 1200px) {
    .post-standard, .post-small {
        grid-column: span 6;
    }
}

/* ==========================================================================
   6. Single Post / Article View
   ========================================================================== */

.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.article-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

/* Prose (Content Styling) */
.prose {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: var(--color-text-primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.prose h2 { font-size: 2rem; }
.prose h3 { font-size: 1.5rem; }

.prose a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

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

.prose blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-text-primary);
    background: var(--color-bg-surface);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
}

.prose ul, .prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose pre {
    background: #0f172a;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--color-border);
}

.prose code {
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.9em;
    color: #e2e8f0;
}

/* Article Footer */
.article-footer {
    max-width: 800px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tag-badge {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.2);
    transition: all var(--transition-fast);
}

.tag-badge:hover {
    background: var(--color-accent);
    color: #fff;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-previous, .nav-next {
    flex: 1;
    background: var(--color-bg-surface);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.nav-previous:hover, .nav-next:hover {
    background: var(--color-bg-surface-hover);
    border-color: var(--color-border-hover);
}

.nav-next { text-align: right; }

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.nav-title {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ==========================================================================
   7. Pagination
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.5rem;
    margin: 0 0.25rem;
    border-radius: 12px;
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    font-weight: 600;
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.page-numbers:hover {
    background: var(--color-bg-surface-hover);
    color: var(--color-text-primary);
}

.page-numbers.current {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}


/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--color-text-primary);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   9. Comments
   ========================================================================== */
.comments-area {
    max-width: 800px;
    margin: 4rem auto 0;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    margin-bottom: 3rem;
}

.comment {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--color-text-primary);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.comment-content {
    color: var(--color-text-secondary);
}

/* Comment Form */
.comment-form {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-family: inherit;
    margin-bottom: 1.5rem;
    transition: all var(--transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.comment-form .submit {
    background: var(--color-accent);
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.comment-form .submit:hover {
    background: var(--color-accent-hover);
    box-shadow: var(--shadow-glow);
}


/* ==========================================================================
   10. Responsiveness
   ========================================================================== */

/* lg: 1024px+ — idêntico ao lg:w-[350px] lg:px-12 lg:py-16 lg:text-5xl */
@media (min-width: 1024px) {
    .sidebar {
        width: 350px;
        padding: 4rem 3rem;  /* py-16 px-12 */
    }
    .sidebar .brand-name {
        font-size: 3rem;     /* text-5xl */
    }
    .main-content {
        margin-left: 350px;
        padding: 4rem 3.5rem;
    }
}

@media (max-width: 1024px) {
    .post-hero {
        flex-direction: column;
    }
    .post-hero .post-card-image,
    .post-hero .post-card-content {
        width: 100%;
    }
    .post-hero .post-card-image {
        height: 250px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .site-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        display: none; /* Hide sidebar completely on mobile */
    }
    
    .mobile-header {
        display: block; /* Show mobile header */
        background: var(--color-bg-glass);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    .main-content {
        margin-left: 0;
        padding: 2rem 1rem;
    }
    
    .posts-bento-grid {
        display: flex;
        flex-direction: column;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-featured-image {
        height: 300px;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .nav-next {
        text-align: left;
    }
}

/* ==========================================================================
   11. Single Post — Layout 2 colunas (main + sidebar direita)
   ========================================================================== */

.single-post-wrapper {
    max-width: 1100px;
}

.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
    margin-top: 2.5rem;
}

/* Coluna principal */
.single-post-main {
    min-width: 0;
}

/* Sidebar direita sticky */
.single-post-sidebar {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0; /* evita overflow no grid */
    min-height: 200px; /* garante que a coluna existe mesmo se conteúdo demorar */
}

/* Widget genérico */
.post-widget {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
}

.post-widget-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

.post-widget-title i {
    color: var(--color-accent);
}

/* ---- Sumário (TOC) ---- */
.toc-nav {
    padding: 1rem 1.25rem;
}

.toc-empty {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.toc-item {
    line-height: 1.4;
}

.toc-item--sub {
    padding-left: 1rem;
}

.toc-link {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}

.toc-link:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-surface);
    border-left-color: var(--color-border-hover);
}

.toc-link--active {
    color: var(--color-accent) !important;
    border-left-color: var(--color-accent) !important;
    background: rgba(6, 182, 212, 0.06);
}

/* ---- Posts relacionados rotativo ---- */
.sidebar-related-list {
    position: relative;
    overflow: hidden;
    /* altura calculada pelo JS, mas definimos mínimo */
    min-height: 80px;
}

.sidebar-related-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1.25rem;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid var(--color-border);

    /* estados do slideshow */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.sidebar-related-item:last-child {
    border-bottom: none;
}

.sidebar-related-item.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative; /* ocupa espaço só quando ativo */
}

.sidebar-related-item.is-leaving {
    opacity: 0;
    transform: translateY(-12px);
    position: absolute;
}

.sidebar-related-item:hover {
    background: var(--color-bg-surface);
}

.sidebar-related-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-related-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-surface);
    color: var(--color-text-muted);
    font-size: 1.25rem;
}

.sidebar-related-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.sidebar-related-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.sidebar-related-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dots do slideshow */
.sidebar-related-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

.sidebar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-border-hover);
    transition: background 0.3s, transform 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.sidebar-dot.is-active {
    background: var(--color-accent);
    transform: scale(1.4);
}

/* Responsivo: oculta sidebar direita em telas menores */
@media (max-width: 1100px) {
    .single-post-layout {
        grid-template-columns: 1fr 260px;
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .single-post-layout {
        grid-template-columns: 1fr;
    }
    .single-post-sidebar {
        position: static;
    }
}

/* ==========================================================================
   12. Reading Progress Bar
   ========================================================================== */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px var(--color-accent-glow);
}

/* ==========================================================================
   12. Single Post — Premium Layout
   ========================================================================== */

.single-post-container {
    max-width: 900px;
}

/* Hero com imagem de fundo */
.article-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 3rem;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
}

.article-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 17, 32, 0.96) 0%, rgba(11, 17, 32, 0.5) 50%, rgba(11, 17, 32, 0.1) 100%);
    z-index: 1;
}

.article-hero-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    width: 100%;
}

.article-hero-content .article-meta {
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.article-hero-content .article-title {
    font-size: 2.5rem;
    margin-bottom: 0;
    text-align: left;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Sem imagem featured: header simples */
.article-header-simple {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.article-header-simple .article-title {
    text-align: left;
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

/* Meta bar */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.article-meta a {
    color: var(--color-accent);
    text-decoration: none;
}

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

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-read-time {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Categorias no topo do post */
.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.article-category-badge {
    background: rgba(6, 182, 212, 0.12);
    color: var(--color-accent);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(6, 182, 212, 0.25);
    transition: all 0.2s;
}

.article-category-badge:hover {
    background: var(--color-accent);
    color: #fff;
}

/* Share bar */
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.share-bar-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    background: var(--color-bg-surface);
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.share-btn.share-twitter:hover { border-color: #1DA1F2; color: #1DA1F2; }
.share-btn.share-linkedin:hover { border-color: #0A66C2; color: #0A66C2; }
.share-btn.share-whatsapp:hover { border-color: #25D366; color: #25D366; }
.share-btn.share-copy { }
.share-btn.share-copy.copied { border-color: var(--color-accent); color: var(--color-accent); }

/* Author card */
.author-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.75rem;
    margin: 3rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
    flex-shrink: 0;
}

.author-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), #0891B2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-signature);
    flex-shrink: 0;
    border: 2px solid var(--color-accent);
}

.author-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-primary);
}

.author-info .author-role {
    font-size: 0.85rem;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.author-info p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-socials {
    display: flex;
    gap: 0.75rem;
}

.author-socials a {
    color: #94A3B8;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.author-socials a:hover {
    color: #fff;
}

/* Related posts */
.related-posts {
    max-width: 800px;
    margin: 3rem auto;
}

.related-posts-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-primary);
}

.related-posts-title::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
}

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

.related-post-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
    display: block;
    color: var(--color-text-primary);
    text-decoration: none;
}

.related-post-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
    color: var(--color-text-primary);
}

.related-post-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.related-post-card-body {
    padding: 1rem;
}

.related-post-date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.related-post-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    .article-hero {
        min-height: 320px;
    }
    .article-hero-content .article-title {
        font-size: 1.75rem;
    }
    .article-header-simple .article-title {
        font-size: 2rem;
    }
    .author-card {
        flex-direction: column;
    }
    .share-bar {
        gap: 0.5rem;
    }
}

/* ==========================================================================
   13. Portal do Blog — Index melhorado
   ========================================================================== */

.blog-portal-hero {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.blog-portal-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.blog-portal-hero h1 span {
    color: var(--color-accent);
}

.blog-portal-hero p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

.blog-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin-top: 1.5rem;
    max-width: 480px;
    transition: border-color 0.2s;
}

.blog-search-bar:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.blog-search-bar i {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.blog-search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    flex: 1;
}

.blog-search-bar input::placeholder {
    color: var(--color-text-muted);
}

/* Category pills */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.category-pill {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    background: var(--color-bg-surface);
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.category-pill:hover,
.category-pill.active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(15, 23, 42, 0.5) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin-top: 4rem;
}

.newsletter-cta h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.newsletter-cta p {
    color: var(--color-text-secondary);
    margin-bottom: 1.75rem;
    font-size: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 440px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1.25rem;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.newsletter-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.newsletter-btn {
    padding: 0.75rem 1.75rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.newsletter-btn:hover {
    background: var(--color-accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* "Leia também" section */
.leia-tambem {
    margin-top: 4rem;
}

.leia-tambem-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.leia-tambem-title::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
}

@media (max-width: 768px) {
    .blog-portal-hero h1 {
        font-size: 2rem;
    }
    .newsletter-cta {
        padding: 2rem 1.5rem;
    }
}