:root {
    --ink: #1a1a2e;
    --ink-soft: #2d2d44;
    --paper: #faf7f2;
    --paper-warm: #f3ede3;
    --accent: #c9a227;
    --accent-dark: #a8861f;
    --teal: #2a7f7f;
    --teal-dark: #1f5f5f;
    --muted: #6b6b7b;
    --border: #e6dfd3;
    --shadow: 0 4px 18px rgba(26,26,46,0.08);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,h2,h3,h4,h5,.brand-mark,.footer-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.site-header {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.site-header .navbar { padding: 0.75rem 0; }

.site-header .navbar-brand {
    font-family: 'Cormorant Garamond', serif;
/*    font-size: 1.6rem;*/
    font-weight: 700;
    color: #fff !important;
    width:20%;
/*    letter-spacing: 0.5px;*/
}

.brand-mark { color: var(--accent); margin-right: 6px; }

.site-header .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    margin: 0 0.25rem;
    transition: color 0.2s;
}
.site-header .nav-link:hover { color: var(--accent) !important; }

.search-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
}
.search-input::placeholder { color: rgba(255,255,255,0.6); }
.search-input:focus { background: rgba(255,255,255,0.18); color:#fff; border-color: var(--accent); box-shadow: none; }

.site-main { flex: 1 0 auto; padding: 2rem 0 3rem; background-color:#f6d87a;}


/* Estilos gerais para ambos */
.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 0;
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 250px;
    /* Imagem padrão: Mobile (telas menores) */
    background-image: url('../assets/almadepoesiamobile.png');
}

/* Quando a tela for maior que 768px (Tablets e Desktops), troca a imagem */
@media (min-width: 769px) {
    .hero {
        background-image: url('../assets/almadepoesiabrowser.png');
    }
}

.btnEscritorio {
    display: flex;
    flex-direction: column; /* empilha na vertical */
    justify-content: flex-end; /* empurra tudo pro fundo */
    min-height: 250px;
    padding:5px;
}
.lgAlma {
    height: 40px; /* Ajuste esse valor para cima ou para baixo até ficar bom (ex: 50px) */
    width: auto; /* Mantém a proporção da imagem sem achatar */
    object-fit: contain; /* Garante que a imagem não seja cortada */
}

.infSite {
    width: 100%;
    color: var(--ink);
    text-align: center;
}

.hero::after {
    content: "✦";
    position: absolute;
    right: 2rem;
    bottom: -2rem;
    font-size: 12rem;
    color: rgba(255,255,255,0.05);
    font-family: serif;
    pointer-events: none;
}
.hero h1 { font-size: 3rem; font-weight: 700; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 640px; }
.card-lit-text-article {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-lit {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.card-lit:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,26,46,0.12); }

.card-lit .card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
}
.card-lit .card-meta { font-size: 0.8rem; color: var(--muted); }
.card-lit .card-excerpt { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.75rem; }

.badge-cat {
    background: var(--paper-warm);
    color: var(--teal-dark);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
}
.badge-cat:hover { background: var(--teal); color: #fff; }

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.sidebar-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.sidebar-box h6 { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; margin-bottom: 0.75rem; }

.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { padding: 0.4rem 0; border-bottom: 1px dashed var(--border); }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.cat-list a:hover { color: var(--teal); }

.pagination .page-link { color: var(--teal-dark); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--teal); border-color: var(--teal); color: #fff; }

.btn-primary-lit {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
}
.btn-primary-lit:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.texto-content {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--ink);
}

.author-card { text-align: center; }
.author-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.author-card .author-name { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; margin-top: 0.75rem; }

.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1rem;
    margin-top: auto;
}
.footer-title { color: #fff; font-size: 1.5rem; }
.footer-sub { color: var(--accent); font-family: 'Inter', sans-serif; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.35rem; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-text { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2rem; padding-top: 1rem; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .empty-icon { font-size: 3rem; color: var(--border); margin-bottom: 1rem; }

.mural-post {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
}

/* ==========================================================================
   Editor de texto rich text
   ========================================================================== */
.alma-editor {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.alma-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0.4rem 0.5rem;
    background: var(--paper-warm);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}

.alma-editor-btn {
    min-width: 32px;
    height: 30px;
    padding: 0 0.5rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.alma-editor-btn:hover { background: #fff; border-color: var(--border); }
.alma-editor-btn.active {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}
.alma-editor-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.alma-editor-btn[disabled]:hover { background: transparent; border-color: transparent; }
.alma-editor-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.35rem;
    align-self: center;
}

.alma-editor-area,
.alma-editor-preview {
    min-height: 320px;
    padding: 1.25rem 1.5rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--ink);
    outline: none;
}
.alma-editor-area:focus { box-shadow: inset 0 0 0 2px rgba(42,127,127,0.15); }

.alma-editor-area p, .alma-editor-preview p { margin-bottom: 0.85rem; }
.alma-editor-area h2, .alma-editor-preview h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; font-weight: 700; margin: 1.2rem 0 0.6rem; }
.alma-editor-area h3, .alma-editor-preview h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.alma-editor-area blockquote, .alma-editor-preview blockquote {
    border-left: 3px solid var(--accent);
    margin: 1rem 0;
    padding: 0.4rem 0 0.4rem 1rem;
    font-style: italic;
    color: var(--ink-soft);
}
.alma-editor-area ul, .alma-editor-area ol,
.alma-editor-preview ul, .alma-editor-preview ol { margin-bottom: 0.85rem; padding-left: 1.6rem; }
.alma-editor-area a, .alma-editor-preview a { color: var(--teal-dark); }
.alma-editor-area img, .alma-editor-preview img { max-width: 100%; border-radius: 8px; }

.alma-editor-orig.alma-editor-orig { display: none; }
.alma-editor-preview { background: var(--paper); border-top: 1px dashed var(--border); }

/* Conteúdo da obra publicada */
.obra-conteudo {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--ink);
    white-space: normal;
}
.obra-conteudo p { margin-bottom: 0.95rem; }
.obra-conteudo h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; font-weight: 700; margin: 1.4rem 0 0.6rem; }
.obra-conteudo h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600; margin: 1.1rem 0 0.5rem; }
.obra-conteudo h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; margin: 1rem 0 0.4rem; }
.obra-conteudo blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.2rem 0;
    padding: 0.4rem 0 0.4rem 1.1rem;
    font-style: italic;
    color: var(--ink-soft);
}
.obra-conteudo ul, .obra-conteudo ol { padding-left: 1.8rem; margin-bottom: 1rem; }
.obra-conteudo img { max-width: 100%; height: auto; border-radius: 10px; }
.obra-conteudo a { color: var(--teal-dark); }
.obra-conteudo hr { border: 0; border-top: 1px dashed var(--border); margin: 1.5rem 0; }

/* ==========================================================================
   Badges de status editorial / badges de interação
   ========================================================================== */
.badge-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.badge-status.rascunho { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.badge-status.publicada { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.badge-status.arquivada { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }
.badge-status.destaque { background: var(--accent); color: var(--ink); border: 1px solid var(--accent-dark); }
.badge-status.evang { background: #e8f4f8; color: var(--teal-dark); border: 1px solid #bde0ea; }
.badge-status.adulto { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.btn-like {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink-soft);
    border-radius: 20px;
    padding: 0.35rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-like:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-like.on { background: var(--accent); border-color: var(--accent-dark); color: #fff; }
.btn-follow {
    border: 1px solid var(--teal);
    background: var(--teal);
    color: #fff;
    border-radius: 20px;
    padding: 0.4rem 1.3rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.btn-follow:hover { background: var(--teal-dark); color: #fff; }
.btn-follow.on { background: transparent; color: var(--teal-dark); }
.btn-follow.on:hover { background: var(--teal); color: #fff; }

/* Painel do autor / métricas */
.metric-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-align: center;
}
.metric-box .metric-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal-dark);
    line-height: 1.1;
}
.metric-box .metric-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }

/* Navegação interna (Escritório / Minha área) */
.subnav {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.subnav a {
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.subnav a:hover { background: var(--paper-warm); color: var(--teal-dark); }
.subnav a.active { background: var(--teal); color: #fff; }

/* Comentários */
.comentario { border-bottom: 1px dashed var(--border); padding: 1rem 0; }
.comentario:last-child { border-bottom: none; }
.comentario .com-meta { font-size: 0.8rem; color: var(--muted); }
.comentario .com-texto { margin: 0.35rem 0 0.5rem; white-space: pre-wrap; }
.comentario.removido { color: var(--muted); font-style: italic; }
.comentario.oculto { opacity: 0.75; font-style: italic; }

/* Perfil do autor */
.autor-header {
    background: linear-gradient(120deg, var(--ink) 0%, var(--teal-dark) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.autor-header img.autor-foto { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--accent); }
.autor-header h1 { font-family: 'Cormorant Garamond', serif; margin-bottom: 0; }
.autor-header .autor-dados { opacity: 0.85; font-size: 0.9rem; }
.autor-header .btn-follow { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.autor-header .btn-follow.on { background: transparent; color: #fff; }
.autor-header .btn-follow.on:hover { background: #fff; color: var(--ink); }

/* Alertas de sucesso inline */
.alert-lit-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.9rem; }
.alert-lit-danger { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.9rem; }
.alert-lit-info { background: #e8f4f8; border: 1px solid #bde0ea; color: var(--teal-dark); border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.9rem; }