/* 
   AMOR COM FIO - Premium Editorial CSS 
   Estilo: Minimalista, Preto & Branco, Sofisticado
*/

/* --- Variáveis de Design (Design Tokens) --- */
:root {
    /* Paleta Monocromática Strict */
    --cor-fundo: #FFFFFF;             /* Branco Puro */
    --cor-fundo-alt: #FAFAFA;         /* Cinza Gelo para seções alternadas */
    --cor-titulo: #050505;            /* Preto Quase Absoluto */
    --cor-texto: #333333;             /* Cinza Escuro para leitura confortável */
    --cor-secundaria: #666666;       /* Cinza Médio para meta dados */
    --cor-borda: #E0E0E0;             /* Cinza muito claro para linhas sutis */
    
    /* Tipografia */
    --fonte-titulo: 'Playfair Display', serif;
    --fonte-corpo: 'Quicksand', sans-serif;
    
    /* Espaçamentos e Layout */
    --container-width: 1200px;
    --g-padrao: 2.5rem;               /* Geração de whitespace negativo */
    
    /* Transições */
    --transicao-suave: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fonte-corpo);
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.8; /* Leitura aérea e elegante */
    font-size: 16px;
    -webkit-font-smoothing: antialiased; /* Renderização de fonte nítida */
}

/* Seleção de texto estilizada */
::selection {
    background-color: var(--cor-titulo);
    color: var(--cor-fundo);
}

/* Tipografia Editorial */
h1, h2, h3, h4 {
    font-family: var(--fonte-titulo);
    color: var(--cor-titulo);
    font-weight: 400; /* O peso regular é mais luxuoso que o bold */
    letter-spacing: -0.02em; /* Tracking apertado é sofisticado */
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsivo fluido */
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

/* Detalhe sutil em H2 - uma linha lateral ou inferior */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--cor-titulo);
    margin-top: 15px;
    transition: width 0.3s ease;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transicao-suave);
    position: relative;
}

/* --- Utilitários --- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Reveal Animation System */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal Animation Delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 20px;
}

/* Button Variants */
.btn-primary {
    background-color: var(--cor-titulo);
    color: var(--cor-fundo);
}

.btn-outline {
    border: 1px solid var(--cor-titulo);
    background: transparent;
    color: var(--cor-titulo);
}

.btn-white {
    background-color: white;
    color: var(--cor-titulo);
    border: 1px solid white;
}

.btn {
    display: inline-block;
    padding: 16px 36px;
    border: 1px solid var(--cor-titulo);
    background-color: transparent;
    color: var(--cor-titulo);
    font-family: var(--fonte-corpo);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transicao-suave);
    /* Remove bordas arredondadas para um visual mais 'architectural' */
    border-radius: 0; 
}

/* Estilos Especiais de Botão */
.btn-solid {
    background-color: var(--cor-titulo);
    color: var(--cor-fundo);
}

.btn:hover {
    background-color: var(--cor-titulo);
    color: var(--cor-fundo);
    transform: translateY(-3px);
    letter-spacing: 3px;
}

.btn-solid:hover {
    background-color: transparent;
    color: var(--cor-titulo);
}

/* --- Header Minimalista --- */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Efeito de vidro fosco */
    border-bottom: 1px solid var(--cor-borda);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 05px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    font-size: 1.8rem;
    color: var(--cor-titulo);
}

.logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1;
}

.logo-text p {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 5px 0 0 0;
    color: var(--cor-secundaria);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav ul li a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--cor-titulo);
    transition: var(--transicao-suave);
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cor-titulo);
}

/* --- Hero Section (Correção de Caminho da Imagem) --- */
.hero {
    /* Caminho absoluto para garantir que carregue */
    background-image: url('/assets/images/capa3.png');
    background-size: cover;
    background-position: center;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* Overlay Gradiente Preto e Branco */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0.9));
    z-index: 1;
}

/* --- Parallax Effects (Caminhos Corrigidos) --- */
.parallax-bg {
    background-image: url('/assets/images/mesa_posta.png'); /* CORRIGIDO */
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-sobre {
    background-image: url('assets/images/capa3.png'); /* CORRIGIDO */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-sobre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 250, 250, 0.85); /* Aumentei opacidade para garantir leitura */
    z-index: 1;
}

.parallax-newsletter {
    background-image: url('/assets/images/capa3.png'); /* CORRIGIDO */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.7);
    z-index: 1;
}

/* Ensure parallax content has proper z-index */
.parallax-sobre .container,
.parallax-newsletter .container {
    position: relative;
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    color: var(--cor-titulo);
    text-shadow: 0 2px 10px rgba(255,255,255,0.5);
    margin-bottom: 30px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--cor-titulo);
    margin-bottom: 40px;
    font-weight: 400;
}

/* --- Posts em Destaque (Grid Editorial) --- */
.posts-destaque {
    padding: var(--g-padrao) 0;
    background-color: var(--cor-fundo);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px; /* Espaço generoso entre cartões */
}

.post-card {
    background: transparent;
    border: 1px solid transparent; /* Prepara para hover */
    transition: var(--transicao-suave);
}

.post-card:hover {
    border-color: var(--cor-borda);
}

/* Imagens Post - Inicialmente P&B, ganham cor no hover */
.post-img {
    height: 300px; /* Mais alto para impacto visual */
    overflow: hidden;
    margin-bottom: 25px;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Filtro P&B global */
    filter: grayscale(100%) contrast(110%);
    transition: var(--transicao-suave);
}

.post-card:hover .post-img img {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.05);
}

.post-category {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cor-secundaria);
    margin-bottom: 10px;
}

.post-content h3 {
    font-size: 1.6rem;
    transition: color 0.3s ease;
}

.post-card:hover .post-content h3 {
    color: #777; /* Sutil mudança de cor no hover */
}

.post-meta {
    border-top: 1px solid var(--cor-borda);
    padding-top: 15px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--cor-secundaria);
    font-family: var(--fonte-corpo);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Seção Sobre (Garantia de Layout) --- */
.sobre {
    padding: var(--g-padrao) 0;
    background-color: var(--cor-fundo-alt);
    border-top: 1px solid var(--cor-borda);
    border-bottom: 1px solid var(--cor-borda);
    /* Garante que o parallax não interfira se o conteúdo for grande */
    position: relative;
    z-index: 2;
}

.sobre-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center; /* Centraliza verticalmente */
    position: relative; /* Garante z-index para o texto */
    z-index: 2;
}

.sobre-img-wrapper {
    /* Garante que o wrapper não colapse */
    min-height: 0;
}

.sobre-img {
    overflow: hidden;
    border: 1px solid var(--cor-borda); /* Adiciona um quadro elegante na imagem */
}

.sobre-img img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    transition: var(--transicao-suave);
}

.sobre:hover .sobre-img img {
    filter: grayscale(0%);
}

/* --- Galeria (Masonry Feel) --- */
.galeria {
    padding: var(--g-padrao) 0;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.galeria-item {
    position: relative;
    height: 350px;
    overflow: hidden;
    cursor: pointer;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.galeria-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.galeria-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); /* Overlay preto sutil */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay i {
    color: white;
    font-size: 2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.galeria-item:hover .galeria-overlay i {
    transform: translateY(0);
}

/* --- Newsletter (Estilo de Assinatura) --- */
.newsletter {
    padding: 100px 0;
    background-color: var(--cor-titulo); /* Fundo Preto */
    color: var(--cor-fundo);
    text-align: center;
}

.newsletter h2 {
    color: var(--cor-fundo);
}

.newsletter h2::after {
    background-color: var(--cor-fundo);
}

.newsletter p {
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto 40px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.newsletter-form input {
    flex-grow: 1;
    background: none;
    border: none;
    padding: 15px;
    color: white;
    font-family: var(--fonte-corpo);
    font-size: 1rem;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-form button {
    background: none;
    border: none;
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 0 15px;
    transition: color 0.3s;
}

.newsletter-form button:hover {
    color: #ccc;
}

/* --- Single Post Page (Estilo Livro) --- */
#post-page {
    padding: 60px 0;
}

.post-body {
    background-color: white;
    padding: 40px;
    border: 1px solid var(--cor-borda);
    margin-top: 40px;
}

.post-meta-large {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: var(--cor-secundaria);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-content-large {
    font-size: 1.15rem;
    color: #222;
}
.post-content-large p {
    margin-bottom: 1.8rem;
}

/* --- Footer --- */
footer {
    background-color: #0a0a0a; /* Quase preto */
    color: #fff;
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo h3 {
    color: #fff;
    font-family: var(--fonte-titulo);
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-logo p {
    color: #999;
    font-size: 0.95rem;
}

.footer-links h4, .footer-social h4 {
    color: #fff;
    font-family: var(--fonte-corpo);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #999;
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: #fff;
    padding-left: 5px; /* Micro-interação */
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Círculos só nos ícones para contraste */
    color: #fff;
}

.social-icons a:hover {
    background-color: #fff;
    color: #000;
    transform: rotate(360deg); /* Animação divertida no hover */
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* --- Loading Spinner --- */
#loading-posts {
    padding: 60px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 1px solid #e0e0e0;
    border-top: 2px solid var(--cor-titulo);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Responsividade --- */
@media (max-width: 992px) {
    .sobre-content {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   MÓBILE UX / UI IMPROVEMENTS
   ================================================================= */

@media (max-width: 768px) {
    
    /* --- 1. Espaçamentos Ajustados (Menos scroll vertical) --- */
    :root {
        --g-padrao: 3.5rem; /* Reduz padding de seções para caber mais na tela */
    }

    /* Hero mais compacto no celular */
    .hero {
        height: 65vh; /* Reduz de 85vh para dar visibilidade ao conteúdo abaixo */
    }
    
    .hero h1 {
        font-size: 2rem; /* Força tamanho legível */
    }

    /* --- 2. Navegação Mobile (Menu Overlay) --- */
    header {
        padding: 15px 0;
    }

    /* Posicionamento do botão de menu */
    .mobile-menu-btn {
        display: block;
        z-index: 1100;
    }

    /* O Menu vira um Drawer/Overlay */
    nav {
        position: fixed; /* Fixo sobre tudo */
        top: 0;
        right: -100%; /* Escondido à direita */
        width: 85%;
        height: 100vh;
        background-color: #fff;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Centraliza os links */
        align-items: center;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1050;
    }

    nav.active {
        right: 0; /* Desliza para dentro */
    }

    nav ul {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    nav ul li a {
        font-size: 1.2rem; /* Links maiores para facilitar o toque */
        padding: 10px 0;
    }

    /* Efeito de fundo escurecido quando o menu abre */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s;
    }
    .menu-overlay.active { display: block; opacity: 1; }

    /* --- 3. Grids e Cartões --- */
    .container {
        width: 92%; /* Um pouco mais de margem nas laterais */
    }

    /* Ajuste dos Posts em Grid */
    .posts-grid, .galeria-grid {
        grid-template-columns: 1fr; /* Uma coluna para foco total */
        gap: 30px;
    }

    /* Ajuste da Seção Sobre (Empilha) */
    .sobre-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Ordem invertida no mobile: Imagem primeiro para impacto visual, Texto depois */
    .sobre-img-wrapper {
        order: -1;
    }

    /* --- 4. Newsletter Mobile --- */
    .newsletter {
        padding: 60px 0;
    }

    .newsletter-form {
        flex-direction: column;
        border: none; /* Remove borda lateral/desktop */
    }

    .newsletter-form input {
        border-bottom: 1px solid rgba(255,255,255,0.3);
        text-align: center;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border: 1px solid rgba(255,255,255,0.3);
        padding: 15px;
        background: rgba(255,255,255,0.1);
    }

    /* --- 5. Footer Mobile --- */
    footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr; /* Uma coluna */
        text-align: center;
        gap: 30px;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-links ul {
        padding-left: 0;
    }

    /* Ajuste do Parallax para Mobile - Desabilita fixed para melhor carregamento */
    .parallax-bg,
    .parallax-sobre,
    .parallax-newsletter {
        background-attachment: scroll;
    }
}

/* Ajustes finos para telas muito pequenas (iPhone SE, etc) */
@media (max-width: 400px) {
    .hero h1 { font-size: 1.8rem; }
    .btn { width: 100%; text-align: center; } /* Botões largos no mobile */
    .hero-content { padding: 0 10px; } 
}