
/*
 Theme Name: Lampejo
 */


/* =========================================
 *   1. IMPORTS & VARIÁVEIS DO TEMA E RESET
 *   ========================================= */
@import url('css/utilities.css');
@import url('css/fonts.css');

:root {
    --cor-creme: #FAEAD4;
    --cor-laranja: #EA6B32;
    --cor-ouro: #F6AD37;
    --cor-verde: #C5CF42;
    --cor-azul: #5FBAC8;
    --cor-azul-claro: var(--cor-azul); /* Otimizado: era a mesma cor */
    --cor-verde-claro: var(--cor-verde); /* Otimizado: era a mesma cor */
    --cor-roxo: #613F86;
    --cor-roxo-escuro: #251E46;
    --cor-esmeralda: #0d897f;
    --angulo: 10vw;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    background-color: var(--cor-creme);
    font-family: "Avenir", sans-serif;
    font-size: 20px;
    color: var(--cor-roxo-escuro);
}

/* =========================================
 *   2. TIPOGRAFIA E ELEMENTOS BASE
 *   ========================================= */
p:not(:last-child), li:not(:last-child) { margin-bottom: 1em; }

strong { font-weight: 900; }

h1, h2, h3, h4, h5 {
    margin-bottom: 1em;
    font-weight: normal;
}

h1, h2, h3, h4, h5,
a.btn, a.btn-plain,
.tag-secao text, .star,
.textos-btn, .star-roxo,
.destaque-branco, span.destaque,
.faq-item summary, blockquote {
    font-family: "Lumios Typewriter New", sans-serif;
}

h1, h2, h3, h4, h5, a.btn, a.btn-plain, .tag-secao text, .star, .textos-btn, .star-roxo {
    line-height: 1.2;
}

ul {
    list-style-position: inside;
    margin-left: 20px;
}
ul li { line-height: 1em; }

/* Botões */
a.btn, a.btn-ouro {
    padding: 10px 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    clip-path: polygon(0% 0%, 100% 16%, 96% 100%, 1.5% 85%);font-family: "Avenir",sans-serif;font-size: 18px;
}

a.btn { background-color: var(--cor-roxo-escuro); color: var(--cor-ouro); }
a.btn-ouro { background-color: var(--cor-ouro); color: var(--cor-roxo-escuro); }

a.btn:hover { background-color: var(--cor-roxo); }
a.btn-ouro:hover { background-color: var(--cor-laranja); }

/* Consolidação dos ícones SVG nos botões */
a.btn::after, a.btn-ouro::after {
    content: "";
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

a.btn::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23F6AD37' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l14 0'/%3E%3Cpath d='M15 16l4 -4'/%3E%3Cpath d='M15 8l4 4'/%3E%3C/svg%3E");
}

a.btn-ouro::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23251E46' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l14 0'/%3E%3Cpath d='M15 16l4 -4'/%3E%3Cpath d='M15 8l4 4'/%3E%3C/svg%3E");
}

a.btn-plain {
    text-decoration: none;
    color: var(--cor-roxo-escuro);
    font-size: 20px;
    display: inline-table;
}

/* =========================================
 *   3. HEADER FIXO E ANIMAÇÕES
 *   ========================================= */
.header-fixo {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 20px 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
}

.logo {
    color: var(--cor-roxo-escuro);
    transition: color .4s ease;
    position: fixed;
    top: 20px;
    left: 30px;
}

.logo svg {    width: 70px;}

body.menu-aberto .logo { color: var(--cor-ouro); }

.btn-menu {
    position: fixed;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 147px;
    height: 39px;
    pointer-events: auto;
    top: 22px;
    right: 9px;
}
.btn-menu svg { position: absolute; top: 0; left: 0; }

.textos-btn {
    position: absolute;
    left: 65px; top: 8px;
    color: var(--cor-ouro);
    font-size: 19px;
    letter-spacing: 1px;
}

.txt-fechar { display: none; opacity: 0; }

.txt-menu, .txt-fechar, .linha-1, .linha-2, .linha-3 {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-menu:not(.ativo):hover .linha-1 { d: path("M 17.4117 19.3715 L 48.6199 11.3715"); }
.btn-menu:not(.ativo):hover .linha-3 { d: path("M 17.4117 19.8715 L 48.6199 27.3715"); }

.btn-menu.ativo .txt-menu { opacity: 0; display: none; }
.btn-menu.ativo .txt-fechar { opacity: 1; display: block; }
.btn-menu.ativo .linha-1 { d: path("M 20.4117 8.8715 L 48.6199 27.3715"); }
.btn-menu.ativo .linha-2 { opacity: 0; }
.btn-menu.ativo .linha-3 { d: path("M 18.4117 26.8715 L 48.4117 10.8715"); }

button#btnMenu:hover {
    transform: rotate(-8deg);
    transition: clip-path 0.7s cubic-bezier(0.77, 0, 0.175, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
 *   4. OVERLAY DO MENU DE TELA CHEIA
 *   ========================================= */
.menu-overlay {
    --topo-btn: 60px;
    position: fixed;
    left: 0; --topo-btn: 22px;
    width: 100%; height: 100vh;
    background-color: var(--cor-roxo-escuro);
    z-index: 998;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    pointer-events: none;
    clip-path: polygon(
        calc(100% - 4vw - 143.5px) var(--topo-btn),
                       calc(100% - 4vw - 0.6px) calc(var(--topo-btn) + 6.6px),
                       calc(100% - 4vw - 1.1px) calc(var(--topo-btn) + 32.6px),
                       calc(100% - 4vw - 147px) calc(var(--topo-btn) + 38.7px)
    );
    transform-origin: calc(100% - 4vw - 73.5px) calc(var(--topo-btn) + 19.5px);
    transition: clip-path 0.7s cubic-bezier(0.77, 0, 0.175, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body:has(#btnMenu:hover):not(.menu-aberto) .menu-overlay { transform: rotate(-8deg); }

body.menu-aberto .menu-overlay {
    pointer-events: auto;
    clip-path: polygon(0% 0%, 100% 0%, 74.5% 100%, 0% 100%);
    transform: rotate(0deg);
}

body.menu-aberto .menu-contato {
    opacity: 1;
    transition: opacity 0.5s ease 0.6s;
}

.menu-overlay a  {color:var(--cor-ouro);text-decoration:none;}

.menu-nav { display: flex; flex-direction: column; gap: 25px; width: 100%;margin: 150px 0 0 0; }
.menu-nav a {
    color: var(--cor-ouro);
    font-family: "Lumios Typewriter New", sans-serif;
    font-size: clamp(18px, 4.5vw, 25px);
    text-decoration: none;
    width: max-content;
    opacity: 0; transform: translateX(50px); transition: all 0.4s ease;
}

body.menu-aberto .menu-nav a { opacity: 1; transform: translateX(0); }
body.menu-aberto .menu-nav a:hover { color: white; transform: translateX(15px); }



/* =========================================
 *   7. PAGINA SIMPLES
 *   ========================================= */

.page-main{
    width:100%;
    padding:140px 30px 100px;
}

.page-wrapper{
    width:min(900px, 100%);
    margin:0 auto;
}

.page-header{
    margin-bottom:60px;
}

.post-title{
    text-align:center;
}

.post-content{
    width:100%;
}

.post-content > *:first-child{
    margin-top:0;
}

.post-content > *:last-child{
    margin-bottom:0;
}

.post-content{
    font-size:1.325rem;
    line-height:1.4;
}

.post-content a {color:inherit;}

/* =========================
 *  PARÁGRAFOS
 = *======================== */

.post-content p{
    margin:0 0 1.6em;
}

.post-content p:last-child{
    margin-bottom:0;
}

/* =========================
 *  TÍTULOS
 = *======================== */

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6{
    line-height:1.2;
    font-weight:600;
}

.post-content h2{
    font-size:2.2rem;
    margin:2.5em 0 0.8em;
}

.post-content h3{
    font-size:1.8rem;
    margin:2.2em 0 0.8em;
}

.post-content h4{
    font-size:1.4rem;
    margin:2em 0 0.7em;
}

.post-content h5{
    font-size:1.2rem;
    margin:1.8em 0 0.6em;
}

.post-content h6{
    font-size:1rem;
    margin:1.6em 0 0.5em;
}

/* evita espaço gigante no topo */
.post-content > *:first-child{
    margin-top:0;
}

/* =========================
 *  LISTAS
 = *======================== */

.post-content ul,
.post-content ol{
    margin:0 0 1.8em 1.5em;
}

.post-content li{
    margin-bottom:0.6em;margin-bottom: 0.6em;
    line-height: 1.5;
}

/* =========================
 *  LINKS
 = *======================== */

.post-content a{
    text-decoration:underline;
    text-underline-offset:2px;
}

/* =========================
 *  IMAGENS
 = *======================== */

.post-content img{
    max-width:100%;
    height:auto;
    display:block;
    margin:2.5em auto;
}

/* =========================
 *  BLOCKQUOTE
 = *======================== */

.post-content blockquote{
    margin:2.5em 0;
    padding-left:1.5em;
    border-left:3px solid currentColor;
    font-style:italic;
}

/* =========================
 *  TABELAS
 = *======================== */

.post-content table{
    width:100%;
    border-collapse:collapse;
    margin:2em 0;
}

.post-content th,
.post-content td{
    padding:12px;
    border:1px solid rgba(0,0,0,0.1);
    text-align:left;
}

/* =========================
 *  SEPARADOR
 = *======================== */

.post-content hr{
    margin:3em 0;
    border:none;
    border-top:1px solid rgba(0,0,0,0.15);
}

/* =========================
 *  MOBILE
 = *======================== */

@media (max-width:768px){

    .post-content{
        font-size:1rem;
        line-height:1.7;
    }

    .post-content h2{
        font-size:1.8rem;
    }

    .post-content h3{
        font-size:1.5rem;
    }

}
/* =========================
 *  404
 = *======================== */*
.erro-404{
    min-height:100vh;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:120px 20px;
}

.erro-404-inner{
    width:min(700px, 100%);
    margin:0 auto;

    text-align:center;
}

.erro-codigo{
    font-size:7rem;
    line-height:1;
    font-weight:700;
    font-family: 'Lumios Typewriter New';
    margin-bottom:20px;
}

.erro-titulo{
    font-size:2.5rem;
    line-height:1.1;

    margin-bottom:25px;
}

.erro-texto{
    font-size:1.125rem;
    line-height:1.7;

    max-width:500px;
    margin:0 auto 40px;
}

.btn-voltar{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:14px 28px;

    border:1px solid currentColor;

    text-decoration:none;

    transition:0.3s ease;
}

.btn-voltar:hover{
    transform:translateY(-2px);
}

@media (max-width:768px){

    .erro-codigo{
        font-size:4.5rem;
    }

    .erro-titulo{
        font-size:2rem;
    }

}

/* =========================================
 *   6. GRID DE POSTS
 *   ========================================= */

h1.archive-title {
    text-align: center;
    font-size: 1.3em;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-table;
    clip-path: polygon(0% 0%, 100% 16%, 96% 100%, 1.5% 85%);
    font-family: 'Lumios Typewriter New';
    background: var(--cor-ouro);
}

.nav-links a {
    color: var(--cor-roxo-escuro);
    text-decoration: none;
}

.nav-links {
    text-align: center;
    word-spacing: 1em;
    margin:2em 0 0 0;
}


section.blog-wrapper {
    margin: 0 auto;
    max-width: 1220px;
    padding: 50px 30px;
}

.cards-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 50px; margin: 0;
}
.card-item {
    width: 100%; max-width: 100%; padding: 40px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 15px;
}
.card-item h3 { margin: 0; font-size: 1.4em; }
.card-item p { margin: 0; font-size: 0.9em; }

/* Posts / Bibliotecas */
.post-card { width: 100%; aspect-ratio: 406 / 509; position: relative;padding:10px 0; }
.post-link { position: relative; display: block; width: 100%; height: 100%; text-decoration: none; overflow: hidden; }
.post-shape { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.post-inner {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column;
    clip-path: path("M0 21.976 390.567 0 406 509 12.465 489.4z");
}
.post-thumb { height: 58%; }
.post-thumb-shape { width: 100%; height: 100%; overflow: hidden; clip-path: path("M0 22 390.5 0l9.5 312-392.5-8.5z"); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.post-link:hover .post-thumb img { transform: scale(1.08); }

.post-grid-content {
    flex: 1;
    background: #6EC0D1; color: var(--cor-roxo-escuro);
    padding: 28px; display: flex; flex-direction: column; justify-content: space-between;
    transition: background-color .35s ease;
}
.post-grid-content h3 {
    margin: 0; font-size: 1.3rem; line-height: 1.15;
    text-transform: uppercase; font-family: 'AvenirBlack'; font-style: italic;
}

/* Otimizado: Removidos seletores explícitos de 2 a 12, as regras (11n+X) já englobam ambos */
.row > div:nth-child(11n + 1) .post-grid-content { background: var(--cor-laranja); }
.row > div:nth-child(11n + 2) .post-grid-content { background: var(--cor-azul-claro); }
.row > div:nth-child(11n + 3) .post-grid-content { background: var(--cor-verde); }
.row > div:nth-child(11n + 4) .post-grid-content { background: var(--cor-ouro); }
.row > div:nth-child(11n + 5) .post-grid-content { background: var(--cor-roxo); }
.row > div:nth-child(11n + 6) .post-grid-content { background: var(--cor-esmeralda); }
.row > div:nth-child(11n + 7) .post-grid-content { background: var(--cor-laranja); }
.row > div:nth-child(11n + 8) .post-grid-content { background: var(--cor-verde); }
.row > div:nth-child(11n + 9) .post-grid-content { background: var(--cor-azul-claro); }
.row > div:nth-child(11n + 10) .post-grid-content{ background: var(--cor-roxo); }
.row > div:nth-child(11n + 11) .post-grid-content{ background: var(--cor-ouro); }
.row > div:nth-child(11n + 12) .post-grid-content{ background: var(--cor-laranja); }

.post-link:hover .post-grid-content { background: var(--cor-roxo-escuro) !important; }
.post-link:hover  .post-grid-content h3 {color:var(--cor-creme)}


.arrow {
    font-size:0;
    content: "";
    display: block;
    position: relative;
    top: 10px;
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' stroke='%23251E46' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14m6-6-6 6m-6-6 6 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center; background-size: contain;
    transition: transform .3s ease;transform: rotate(230deg);
}

/* =========================================
 *   5 SINGLE POST
 *   ========================================= */

article.single-post{
    clip-path: polygon(0% 7%, 94% 3%, 100% 100%, 2% 98%);
    background-color: var(--cor-creme);
    max-width: 900px;
    margin: 0 auto;
    padding: 140px 30px 100px 30px;
}
.single-post-page{
    padding-bottom:120px;
    background-color:var(--cor-azul);
}

/* =========================
 *  THUMB
 = *======================== */

.single-thumb{
    width:100%;
    margin-bottom:60px;
}

.single-thumb img{
    width:100%;
    height:auto;
    display:block;
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
    clip-path: polygon(0% 1%, 95% 4%, 100% 97%, 3% 98%);
}

/* =========================
 *  HEADER
 = *======================== */

.single-header{
    width:min(900px, calc(100% - 40px));
    margin:0 auto 70px;

    text-align:center;
}

.single-meta{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:10px;

    margin-bottom:24px;

    font-size:0.95rem;
}

.single-meta a{
    text-decoration:none;
}

.single-title{
    font-size:clamp(2.5rem, 1vw, 5rem);
    line-height:1.05;
}

/* =========================
 *  CONTENT
 = *======================== */

.single-content-wrapper{
    width:min(900px, calc(100% - 40px));
    margin:0 auto;
}

/* =========================
 *  FOOTER / TAGS
 = *======================== */

.single-footer{
    width:min(900px, calc(100% - 40px));
    margin:80px auto 0;
}

.single-tags{}

.single-tags a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:0.9rem;
    transition:0.3s ease;
    color:var(--cor-roxo-escuro);
    font-family:"Avenir",sans-serif;
}

.single-tags a:hover{
    transform:translateY(-2px);
}

/* =========================
 *  MOBILE
 = *======================== */

@media (max-width:768px){

    .single-thumb{
        margin-bottom:40px;
    }

    .single-header{
        margin-bottom:50px;
    }

}

/* =========================================
 *   8. FOOTER
 *   ========================================= */
.footer-lampejo { background: var(--cor-roxo-escuro); padding: 50px 20px; color: var(--cor-creme); font-size: 0.7em; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 60px; text-align: center;}
.footer-col h4 { font-size: 1rem; font-style: italic; margin-bottom: 10px; text-transform: uppercase; font-family: 'AvenirBlack'; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li, .footer-col p { margin-bottom: 10px; line-height: 1.5; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }


/* =========================================
 *   9. MEDIA QUERIES (RESPONSIVO)
 *   ========================================= */
@media (max-width: 768px) {
    /* Otimizado: Media queries mescladas */
    .cards-grid { grid-template-columns: 1fr; gap: 20px; }
    .card-item { padding: 30px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }

    body.menu-aberto .menu-overlay { clip-path: polygon(0% 0%, 100% 0%, 80% 100%, 0% 100%) }
    .secao { padding-left: 24px; padding-right: 24px; }
    .card-topo { flex-direction: column; }
    .card-identidade { width: 100%; }
}

@media (min-width: 768px) {

    section.blog-wrapper {        padding: 100px 30px;    }

    .btn-menu {
        top: 24px;
        right: 70px;
    }

    .logo {
        top: 40px;
        left: 30px;
    }

    .logo svg {    width: 100px;}



    .footer-grid { text-align: left;}

}

/* =========================================
 *   AJUSTES PARA NOTEBOOKS (Telas até 1366px)
 *   ========================================= */


@media (min-width: 769px) and (max-width: 1366px) {

    .post-card {
        padding: 10px 10px;
    }
    .btn-menu {
        right: 60px;
    }
}


@media (min-width: 1500px) {

    .row.biblio {  margin: 0 auto;}
    .post-card { padding:10px;}

    .arrow {    top: 10px;}

    .menu-overlay {    padding: 50px;}

}