/* Variáveis de estilo */
:root {
    --bg-color: #d8d8d2;
    --paper-color: #ffffff;
    --text-color: #1a1a1a;
    --border-color: #000000;
}

/* Fundo com efeito Dithering (Pontilhado técnico) */
body {
    background-color: var(--bg-color);
    background-image: radial-gradient(
        rgba(0, 0, 0, 0.15) 0.5px,
        transparent 0.5px
    );
    background-size: 3px 3px;
    color: var(--text-color);
    font-family: "Georgia", "Times New Roman", serif;
    line-height: 1.6;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

/* Container principal */
.container {
    width: 100%;
    max-width: 900px;
    position: relative;
}

header {
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.05);
}

.ascii-banner {
    font-family: monospace;
    white-space: pre;
    font-size: 8px;
    line-height: 1.1;
    color: #000;
    margin-bottom: 20px;
    display: block;
    user-select: none;
}

h1 {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: monospace;
}

nav {
    margin-top: 20px;
    font-family: monospace;
    font-size: 0.8rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #000;
    margin: 0 4px;
    background: #fff;
}

nav a:hover {
    background: #000;
    color: #fff;
}

/* Títulos de Sessão */
.section-title {
    font-family: monospace;
    font-size: 0.9rem;
    background: #000;
    color: #fff;
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Layout Masonry */
.photo-feed {
    column-count: 2;
    column-gap: 30px;
    width: 100%;
}

.thermal-print {
    break-inside: avoid;
    margin-bottom: 30px;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.thermal-print:hover {
    transform: translateY(-3px);
}

/* Estilo para posts de Blog (Texto) */
.blog-post {
    border-left: 4px solid #000; /* Destaque lateral para diferenciar de fotos */
}

/* Proporções de Imagem */
.photo-container {
    width: 100%;
    border: 1px solid #000;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
    display: flex;
}

.ratio-9-16 {
    aspect-ratio: 9 / 16;
}
.ratio-16-9 {
    aspect-ratio: 16 / 9;
}
.ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.photo-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#000 0.6px, transparent 0.6px);
    background-size: 2px 2px;
    opacity: 0.25;
    pointer-events: none;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(2) brightness(1.1);
    display: block;
}

.torn-edge {
    width: 100%;
    height: 10px;
    background-image:
        linear-gradient(135deg, transparent 5px, #000 5px),
        linear-gradient(-135deg, transparent 5px, #000 5px);
    background-position: left bottom;
    background-repeat: repeat-x;
    background-size: 10px 10px;
    filter: invert(1);
    margin-top: -1px;
    opacity: 0.8;
    margin-bottom: 10px;
}

/* Estilo Recibo nos Cards */
.print-meta {
    font-family: monospace;
    font-size: 0.7rem;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
    line-height: 1.3;
}

.meta-line {
    display: flex;
    justify-content: space-between;
}

.print-caption {
    font-family: "Georgia", serif;
    font-style: italic;
    margin: 15px 0 0 0;
    font-size: 0.85rem;
    text-align: left;
}

/* Estilos específicos para o Blog */
.post-title {
    font-family: monospace;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 10px 0;
    text-transform: uppercase;
    line-height: 1.2;
}

.post-excerpt {
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: justify;
}

.read-more {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: bold;
    text-decoration: none;
    color: #000;
    border: 1px solid #000;
    padding: 4px 8px;
    align-self: flex-start;
    transition: 0.2s;
}

.read-more:hover {
    background: #000;
    color: #fff;
}

footer {
    margin-top: 80px;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    padding: 40px;
    text-align: center;
    font-family: monospace;
    font-size: 0.7rem;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.05);
}

.barcode {
    height: 40px;
    background: repeating-linear-gradient(
        90deg,
        #000,
        #000 1px,
        transparent 1px,
        transparent 4px,
        #000 4px,
        #000 5px
    );
    width: 160px;
    margin: 0 auto 15px auto;
}

/* Responsividade */
@media (max-width: 768px) {
    .photo-feed {
        column-count: 1;
    }
    header,
    footer,
    .thermal-print {
        padding: 20px;
    }
}
