/* --- Variáveis do Tema Blueprint Café (Versão Final: Menu Hambúrguer) --- */
:root {
    /* Paleta de Cores */
    --bg-blueprint: #121b29; /* Azul Profundo (Fundo) */
    --bg-surface: #1e2b40;   /* Azul Intermediário (Cards/Header) */
    --bg-darker: #0d131c;    /* Detalhes escuros */
    
    --accent-cream: #f2e3d5; /* Cor de destaque (Creme) */
    --accent-gold: #dcbfa6;  /* Variação secundária */
    
    --text-main: #ffffff;    /* Texto principal */
    --text-muted: #b0c4de;   /* Texto secundário (Azul acinzentado) */
    
    /* Grid bem suave */
    --grid-line: rgba(242, 227, 213, 0.035); 
    
    /* Fontes */
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Lato', sans-serif;
    --font-tech: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-blueprint);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    
    /* Padrão de Grid Blueprint */
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- Wrapper Principal --- */
.page-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Tech --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0; 
    margin-bottom: 50px; 
    border-bottom: 2px solid var(--accent-cream);
    position: relative;
    background-color: var(--bg-blueprint);
    z-index: 10;
    height: 100px; /* Altura compacta */
    overflow: visible; /* Permite o texto sair da caixa */
}

header::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 100px;
    height: 10px;
    background-color: var(--bg-blueprint);
    border-left: 2px solid var(--accent-cream);
    border-right: 2px solid var(--accent-cream);
}

.header-content {
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 40px; 
}

/* Estilo para a Logo de Texto (05.webp) */
.site-title-img {
    margin: 0;
    line-height: 0;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    z-index: 20; 
}

.site-title-img img {
    height: 145px; /* Tamanho grande para destaque */
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); 
    transform: scale(1.1); 
    transform-origin: left center;
    margin-top: 10px; 
}

.logo-link {
    text-decoration: none;
    border: none;
}

/* --- Botão Mobile (Escondido no Desktop) --- */
.mobile-menu-btn {
    display: none;
}

/* --- Navegação Desktop --- */
nav {
    display: flex;
    gap: 30px;
    font-family: var(--font-tech);
    font-size: 0.9rem;
    align-items: center;
    height: 100%;
}

nav a {
    color: var(--text-muted);
    position: relative;
    padding: 5px 0;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    height: 100%;
    text-transform: uppercase;
}

nav a:hover, nav a.active {
    color: var(--accent-cream);
    text-shadow: 0 0 8px rgba(242, 227, 213, 0.4);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: 28px; 
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-cream);
}

/* Dropdown Desktop */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown-btn {
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--accent-cream);
    min-width: 160px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-main);
    height: auto;
}

.dropdown-content a:hover {
    background-color: var(--accent-cream);
    color: var(--bg-blueprint);
    text-shadow: none;
}

/* --- Layout Grid Principal --- */
main.container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    padding-bottom: 60px;
}

/* --- Seção de Posts (Home) --- */
.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px dashed var(--text-muted);
    padding-bottom: 10px;
}

.posts-header h2 {
    font-family: var(--font-tech);
    color: var(--accent-cream);
    font-size: 1.5rem;
    text-shadow: none;
}

.see-all-btn {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    border: 1px solid var(--accent-cream);
    padding: 6px 16px;
    border-radius: 4px;
    color: var(--accent-cream);
    transition: all 0.2s ease;
}

.see-all-btn:hover {
    background: var(--accent-cream);
    color: var(--bg-blueprint);
    text-shadow: none;
}

/* --- Card de Post Principal --- */
.post-featured {
    background-color: var(--bg-surface);
    border: 1px solid rgba(242, 227, 213, 0.15);
    margin-bottom: 30px;
    display: flex;
    height: 260px; /* Altura fixa */
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.post-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 10px; height: 10px;
    border-top: 2px solid var(--accent-cream);
    border-left: 2px solid var(--accent-cream);
    z-index: 2;
}

.post-link:hover .post-featured {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.5);
    border-color: var(--accent-cream);
}

.post-image-container {
    flex: 0 0 45%;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid rgba(242, 227, 213, 0.1);
    background-color: #000;
}

.post-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.post-link:hover img {
    transform: scale(1.05);
}

.post-content {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.2;
}

.post-description {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-author {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--accent-cream);
    margin-top: auto;
    display: inline-block;
    background: rgba(242, 227, 213, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
}

/* --- Galeria de Vídeos --- */
.video-gallery-section {
    margin-top: 60px;
}

.video-gallery-section h3 {
    font-family: var(--font-tech);
    color: var(--accent-cream);
    border-left: 4px solid var(--accent-cream);
    padding-left: 15px;
    margin-bottom: 25px;
    text-shadow: none;
}

.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.video-card {
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    background: #000;
}

.video-card img {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.8;
    transition: 0.3s;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.video-card:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.video-card:hover {
    border-color: var(--accent-cream);
}

/* --- Sidebar --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.newsletter-box {
    background: var(--bg-surface);
    border: 2px solid var(--accent-cream);
    padding: 25px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.newsletter-box::before {
    content: 'NEWSLETTER_V1.0';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-blueprint);
    padding: 0 10px;
    font-family: var(--font-tech);
    color: var(--accent-cream);
    font-size: 0.8rem;
    font-weight: bold;
}

.newsletter-box h3 { display: none; }

.newsletter-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.substack-embed {
    background: #fff;
    border-radius: 4px;
}

/* Posts Antigos (Sidebar) */
.old-posts-box h3 {
    font-family: var(--font-tech);
    font-size: 1.1rem;
    color: var(--accent-cream);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
    text-shadow: none;
}

.posts-secondary .post {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    background: rgba(30, 43, 64, 0.6);
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: 0.2s;
}

.posts-secondary .post:hover {
    border-color: var(--accent-cream);
    background: var(--bg-surface);
}

.posts-secondary .post-image-container {
    flex: 0 0 90px;
    height: 60px;
    border: none;
    min-height: auto;
    border-radius: 2px;
    overflow: hidden;
}

.posts-secondary .post-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.posts-secondary h2 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.posts-secondary .post-description { display: none; }

.posts-secondary .post-author {
    font-size: 0.7rem;
    background: none;
    padding: 0;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: 0.8rem;
    margin-top: 40px;
}

/* --- RESPONSIVIDADE / MOBILE --- */
@media (max-width: 900px) {
    main.container {
        grid-template-columns: 1fr;
    }

    .post-featured {
        flex-direction: column;
        height: auto;
    }

    .post-image-container {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        height: 200px;
        flex: none;
    }

    /* Sidebar reordenada */
    .sidebar {
        display: flex;
        flex-direction: column;
    }

    .old-posts-box {
        order: 1; /* Arquivos aparecem primeiro */
    }

    .newsletter-box {
        order: 2; /* Newsletter aparece depois */
        margin-top: 20px;
    }
}

/* --- MOBILE EXCLUSIVO (Menu Hambúrguer e Header) --- */
@media (max-width: 600px) {
    header {
        height: auto;
        padding: 25px 0;
        overflow: hidden;
        flex-direction: column;
        gap: 20px;
    }
    
    .header-content {
        padding-left: 0;
        justify-content: center;
    }
    
    /* Logo Grande no Mobile */
    .site-title-img img {
        height: 200px;
        transform: none;
        margin-top: 0;
    }
    
    /* Estilo do Botão de Menu Tech */
    .mobile-menu-btn {
        display: block;
        background: transparent;
        border: 1px solid var(--accent-cream);
        color: var(--accent-cream);
        font-family: var(--font-tech);
        font-size: 0.9rem;
        font-weight: 700;
        padding: 12px 20px;
        margin: 10px auto 20px auto; /* Centraliza */
        width: 80%;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:hover,
    .mobile-menu-btn.active {
        background: var(--accent-cream);
        color: var(--bg-blueprint);
    }

    /* Esconde a navegação por padrão */
    nav {
        display: none; /* Escondido */
        flex-direction: column;
        width: 100%;
        background-color: rgba(0,0,0,0.3);
        border-top: 1px solid rgba(255,255,255,0.1);
        padding: 10px 0;
        height: auto;
        gap: 0;
    }

    /* Mostra quando ativo */
    nav.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Ajuste dos links no menu mobile */
    nav a {
        width: 100%;
        text-align: center;
        padding: 15px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: block; /* Ocupa linha inteira */
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    nav a.active::after {
        bottom: 10px;
        width: 50px;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Ajustes de botões grandes */
    .posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .see-all-btn {
        width: 100%;
        text-align: center;
        padding: 12px 0;
        background-color: rgba(242, 227, 213, 0.05);
    }
}