:root {
    --primary: #E4C48B;
    --primary-dark: #B8924F;
    --primary-light: #F6E7C6;

    --bg: #FAF7F0;
    --card: #FFFFFF;
    --text: #2D2418;
    --muted: #7A6A55;
    --border: #E8D8B8;

    --shadow: 0 8px 24px rgba(45, 36, 24, 0.08);
}

body.dark {
    --bg: #18140F;
    --card: #241E16;
    --text: #F8EEDC;
    --muted: #C7B28C;
    --border: #4A3A24;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

button,
select,
input {
    font-family: inherit;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* MENU */

.menu-lateral {
    width: 270px;
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 22px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform .3s ease;
    box-shadow: var(--shadow);
}

.menu-lateral.fechado {
    transform: translateX(-100%);
}

.menu-header {
    margin-bottom: 28px;
}

.menu-header h2 {
    font-size: 1.5rem;
    color: var(--text);
}

.menu-header span {
    color: var(--muted);
    font-size: 0.9rem;
}

.menu-lateral nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-lateral nav button {
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 1rem;
    cursor: pointer;
    transition: .2s;
}

.menu-lateral nav button:hover,
.menu-lateral nav button.ativo {
    background: var(--primary-light);
    color: #2D2418;
}

/* CONTEÚDO */

.conteudo {
    flex: 1;
    min-height: 100vh;
    margin-left: 270px;
    transition: margin-left .3s ease;
}

.conteudo.expandido {
    margin-left: 0;
}

.topbar {
    height: 68px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar h1 {
    flex: 1;
    font-size: 1.1rem;
}

.btn-topo {
    border: none;
    background: var(--primary);
    color: #2D2418;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.1rem;
}

/* VIEWS */

.view {
    display: none;
    padding: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.view.ativa {
    display: block;
}

/* HOME */

.hero {
    background: linear-gradient(135deg, var(--primary-light), var(--card));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.hero p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 22px;
}

.btn-primary {
    border: none;
    background: var(--primary);
    color: #2D2418;
    padding: 13px 18px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
}

.cards-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    background: var(--card);
	cursor: pointer;
	transition: .2s;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 8px;
}

.card p {
    color: var(--muted);
    line-height: 1.5;
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-dark);
}

/* CATECISMO */

.controles-catecismo {
    display: grid;
    gap: 12px;
    margin: 18px 0 22px;
}

select,
input {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 1rem;
}

.paragrafo-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.paragrafo-numero {
    display: inline-block;
    background: var(--primary);
    color: #2D2418;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.paragrafo-card p {
    line-height: 1.75;
    font-size: 1.05rem;
}

.acoes-paragrafo {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.acoes-paragrafo button {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    padding: 9px 12px;
    border-radius: 12px;
    cursor: pointer;
}

/* FAVORITOS */

.lista-vazia {
    color: var(--muted);
    text-align: center;
    padding: 30px;
}

/* SOBRE / COLABORE */

.bloco-texto {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow);
    line-height: 1.7;
}

.bloco-texto h2 {
    margin-bottom: 12px;
}

.bloco-texto p {
    margin-bottom: 14px;
    color: var(--muted);
}

/* MOBILE */

@media (max-width: 800px) {
    .conteudo {
        margin-left: 0;
    }

    .conteudo.expandido {
        margin-left: 0;
    }

    .cards-home {
        grid-template-columns: 1fr;
    }

    .view {
        padding: 18px;
    }

    .hero {
        padding: 24px;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .topbar h1 {
        font-size: 1rem;
    }
}

/* REFERÊNCIAS DAS NOTAS */

.texto-paragrafo {
    line-height: 1.75;
    font-size: 1.05rem;
}

.nota-link {
    color: #B8924F;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.nota-link:hover {
    text-decoration: underline;
}

/* POPUP DAS NOTAS */

.popup-nota {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-nota.ativo {
    display: flex;
}

.popup-nota-box {
    background: #fff;
    max-width: 600px;
    width: 100%;
    padding: 25px;
    border-radius: 16px;
    position: relative;
}

.popup-fechar {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: #E4C48B;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

.bloco-intro-catecismo {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}

.resultados-busca {
    margin-bottom: 24px;
}

.resultados-busca h3 {
    margin-bottom: 12px;
}

.resultado-busca-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.resultado-busca-item:hover {
    border-color: var(--primary-dark);
}

.resultado-busca-item strong {
    color: var(--primary-dark);
}

.resultado-busca-item p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.5;
}


#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2D2418;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: .3s;
}

#toast.mostrar {
    opacity: 1;
}

mark {
    background: var(--primary);
    color: #2D2418;
    padding: 1px 3px;
    border-radius: 4px;
}

.paragrafo-destaque {
    outline: 3px solid var(--primary);
    animation: destaqueParagrafo 1s ease-in-out infinite alternate;
}

@keyframes destaqueParagrafo {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.01);
    }
}