/* escolinha.org - interface global */
:root {
  --eh-brand: #712cf9;
  --eh-brand-dark: #5a1fd1;
  --eh-brand-soft: #f1eaff;
  --eh-card-bg: #ffffff;
  --eh-card-border: #e7e3f0;
  --eh-text: #1f1b2d;
  --eh-muted: #6b6680;
  --eh-shadow: 0 2px 8px rgba(40, 20, 90, .06);
  --eh-shadow-hover: 0 8px 22px rgba(40, 20, 90, .14);
}
[data-bs-theme="dark"] {
  --eh-brand-soft: #2a2140;
  --eh-card-bg: #1e1b29;
  --eh-card-border: #34304a;
  --eh-text: #f2effa;
  --eh-muted: #a8a3bd;
  --eh-shadow: none;
  --eh-shadow-hover: 0 8px 22px rgba(0, 0, 0, .4);
}

/* ---------- Largura total: barra lateral vira menu "Temas" ---------- */
.bd-layout { display: block !important; }
.bd-main { max-width: 100%; }
@media (min-width: 992px) {
  .bd-sidebar { position: static !important; height: 0 !important; overflow: visible !important; top: auto !important; }
}
.navbar-toggler { display: inline-flex !important; align-items: center; gap: 6px; }
.eu-temas-label { display: none; font-weight: 600; font-size: .95rem; color: #fff; }
@media (min-width: 992px) { .eu-temas-label { display: inline; } }
#bdSidebar.offcanvas { width: 320px; max-width: 86vw; transition: none !important; display: flex !important; flex-direction: column; }
#bdSidebar .offcanvas-header { position: sticky; top: 0; z-index: 2; flex: 0 0 auto; background: var(--bs-body-bg, #fff); opacity: 1 !important; visibility: inherit !important; transform: none !important; transition: none !important; }
#bdSidebar .offcanvas-title { font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--eh-brand); }
#bdSidebar .offcanvas-body { flex: 1 1 auto; overflow-y: auto; }
#bdSidebar .offcanvas-body { padding: 8px 16px 24px; }
#bdSidebar .bd-links-heading { font-family: 'Poppins', sans-serif; font-size: .98rem; padding: 6px 0; }
#bdSidebar .bd-links-link { padding: 5px 10px; border-radius: 8px; color: var(--eh-text); text-decoration: none; }
#bdSidebar .bd-links-link:hover { background: var(--eh-brand-soft); color: var(--eh-brand); }

/* ---------- Barra de temas ---------- */
.eu-themebar { background: var(--bs-body-bg, #fff); border-bottom: 1px solid var(--eh-card-border); box-shadow: 0 2px 6px rgba(40, 20, 90, .04); }
.eu-themebar-inner { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.eu-themebar-inner::-webkit-scrollbar { display: none; }
.eu-theme-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 13px; border-radius: 999px;
  background: var(--eh-brand-soft); color: var(--eh-brand);
  font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.eu-theme-chip .material-symbols-rounded { font-size: 18px; }
.eu-theme-chip:hover { background: var(--eh-brand); color: #fff; }
.eu-theme-chip-home, .eu-theme-chip-alt { background: transparent; border: 1px solid var(--eh-card-border); color: var(--eh-text); }

/* ---------- Cartões (também usados fora da home) ---------- */
.eh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; }
.eh-card { display: flex; flex-direction: column; background: var(--eh-card-bg); border: 1px solid var(--eh-card-border); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--eh-text); box-shadow: var(--eh-shadow); transition: transform .18s, box-shadow .18s; }
.eh-card:hover { transform: translateY(-3px); box-shadow: var(--eh-shadow-hover); color: var(--eh-text); }
.eh-card-img { position: relative; display: block; aspect-ratio: 4 / 5; background: #fff; overflow: hidden; }
.eh-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .25s; }
.eh-card:hover .eh-card-img img { transform: scale(1.04); }
.eh-card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-top: 1px solid var(--eh-card-border); }
.eh-card-title { font-weight: 600; font-size: .95rem; line-height: 1.25; display: block !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset !important; }
.eh-card-count { font-size: .8rem; color: var(--eh-muted); }

/* Imagem sempre centralizada no cartão, qualquer proporção */
.eh-card-img { display: flex !important; align-items: center; justify-content: center; }
.eh-card-img img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; object-fit: contain; margin: auto; }

/* ---------- Galeria dos posts ---------- */
.single .wp-block-gallery.has-nested-images { gap: 16px !important; margin: 20px 0 28px; }
.single .wp-block-gallery.has-nested-images figure.wp-block-image {
  width: calc(25% - 12px) !important; flex-grow: 0 !important;
  background: #fff; border: 1px solid var(--eh-card-border); border-radius: 14px;
  box-shadow: var(--eh-shadow); overflow: hidden; margin: 0 !important;
  transition: transform .18s, box-shadow .18s;
}
.single .wp-block-gallery.has-nested-images figure.wp-block-image:hover { transform: translateY(-3px); box-shadow: var(--eh-shadow-hover); }
.single .wp-block-gallery.has-nested-images figure.wp-block-image a { display: block; aspect-ratio: 4 / 5; }
.single .wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100% !important; height: 100% !important; object-fit: contain !important; padding: 10px; background: #fff;
}
@media (min-width: 1200px) { .single .wp-block-gallery.has-nested-images figure.wp-block-image { width: calc(20% - 13px) !important; } }
@media (max-width: 767px) { .single .wp-block-gallery.has-nested-images figure.wp-block-image { width: calc(50% - 8px) !important; } }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .92rem; row-gap: 2px; }
.breadcrumb .breadcrumb-item { padding: 0 !important; }
.breadcrumb .breadcrumb-item::before { display: none !important; }
.breadcrumb a { color: var(--eh-brand); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb svg { width: 12px; height: 12px; opacity: .5; flex: 0 0 auto; }
@media (max-width: 575px) {
  .breadcrumb { font-size: .82rem; }
  .breadcrumb .breadcrumb-item:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Relacionados ---------- */
/* Lista antiga "Outros ... para colorir" do template, substituída pelos cartões abaixo */
.related-posts > h2, .related-posts > ul { display: none !important; }
.eu-related { margin: 40px 0 20px; padding-top: 24px; border-top: 1px solid var(--eh-card-border); }
.eu-related h2 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.35rem; margin: 0 0 16px; }

/* ---------- Navegação da página de impressão ---------- */
.eu-printnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.eu-printnav-btn { display: inline-flex; align-items: center; gap: 2px; padding: 9px 16px; border-radius: 999px; background: var(--eh-brand); color: #fff; font-weight: 600; text-decoration: none; }
.eu-printnav-btn:hover { background: var(--eh-brand-dark); color: #fff; }
.eu-printnav-count { color: var(--eh-muted); font-size: .92rem; }

/* ---------- Rodapé ---------- */
.eu-footer { background: #1f1636; color: #d9d3ee; padding: 44px 0 28px; margin-top: 48px; }
.eu-footer + .bd-footer { margin-top: 0 !important; }
.eu-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.eu-footer-logo { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.4rem; color: #fff; text-decoration: none; }
.eu-footer-brand p { margin-top: 8px; font-size: .92rem; opacity: .85; }
.eu-footer h3 { font-size: .95rem; font-weight: 700; color: #fff; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.eu-footer ul { list-style: none; padding: 0; margin: 0; }
.eu-footer li { margin: 0 0 6px; }
.eu-footer a { color: #d9d3ee; text-decoration: none; font-size: .92rem; }
.eu-footer a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 767px) { .eu-footer-grid { grid-template-columns: 1fr 1fr; } .eu-footer-brand { grid-column: 1 / -1; } }

/* Logo no rodapé (fundo claro) */
.eu-footer-logo-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.eu-footer-logo-wrap .eu-logo { position: static !important; transform: none !important; }
.eu-footer-logo-wrap a.eu-logo--dark, .eu-footer-logo-wrap a.eu-logo--dark:hover { color: var(--eh-brand) !important; }
.eu-footer-logo-wrap .eu-logo--dark .eu-logo-text small { color: var(--eh-muted) !important; opacity: 1; }
[data-bs-theme="dark"] .eu-footer-logo-wrap a.eu-logo--dark { color: #fff !important; }
.bd-footer { margin-top: 48px !important; }

/* ---------- Header v2 ---------- */
.eu-header { background: linear-gradient(90deg, #5e1fe0 0%, #7b3cff 60%, #8f5bff 100%); color: #fff; }
.eu-header-inner { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 12px; }
.eu-menu-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; border-radius: 12px; padding: 7px 12px; font-weight: 600; line-height: 1;
  transition: background .15s;
}
.eu-menu-btn:hover { background: rgba(255, 255, 255, .26); }
.eu-menu-btn .material-symbols-rounded { font-size: 24px; }
.eu-temas-label { display: none; font-size: .95rem; }
@media (min-width: 992px) { .eu-temas-label { display: inline; } }

/* Logo */
.eu-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; flex: 0 0 auto; }
.eu-logo:hover { color: #fff; }
.eu-logo-mark {
  position: relative; width: 36px; height: 36px; border-radius: 11px;
  background: conic-gradient(from 210deg, #ffd43b, #ff8787, #f783ac, #74c0fc, #8ce99a, #ffd43b);
  display: grid; place-items: center; transform: rotate(-6deg);
  box-shadow: 0 3px 10px rgba(20, 0, 70, .35);
}
.eu-logo-mark span {
  width: 28px; height: 28px; border-radius: 8px; background: #fff;
  display: grid; place-items: center; transform: rotate(6deg);
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 20px; line-height: 1; color: #6a26f0;
  padding-bottom: 2px;
}
.eu-logo-text { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.4rem; letter-spacing: -.02em; line-height: 1; }
.eu-logo-text small { font-size: .62em; font-weight: 500; opacity: .78; margin-left: 1px; letter-spacing: 0; }

/* Navegação principal */
.eu-mainnav { display: none; align-items: center; gap: 2px; margin-left: 10px; }
.eu-mainnav a { color: rgba(255, 255, 255, .92); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 7px 11px; border-radius: 10px; white-space: nowrap; }
.eu-mainnav a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
@media (min-width: 992px) { .eu-mainnav { display: flex; } }
/* Logo centralizado no computador */
.eu-header-inner { position: relative; }
@media (min-width: 992px) {
  .eu-mainnav { margin-left: 4px; }
  .eu-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .eu-mainnav a { padding: 7px 8px; font-size: .9rem; }
  .eu-header-right .eu-search-btn { min-width: 210px; }
}
/* Busca maior no header */
@media (min-width: 1200px) { .eu-header-right .eu-search-btn { min-width: 300px; padding: 9px 18px 9px 14px; } }
@media (min-width: 1500px) { .eu-header-right .eu-search-btn { min-width: 400px; } }

/* Direita: busca + entrar */
.eu-header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.eu-header-right .entrar { position: static !important; margin: 0 !important; }
.eu-search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  color: rgba(255, 255, 255, .92); border-radius: 999px; padding: 7px 10px; line-height: 1;
  transition: background .15s;
}
.eu-search-btn:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.eu-search-btn .material-symbols-rounded { font-size: 22px; }
.eu-search-placeholder { display: none; font-size: .95rem; }
@media (min-width: 768px) {
  .eu-search-btn { min-width: 230px; padding: 8px 16px 8px 12px; }
  .eu-search-placeholder { display: inline; }
}
@media (max-width: 575px) {
  .eu-header-inner { gap: 8px; padding: 8px 10px; }
  .eu-logo-text { font-size: 1.18rem; }
  .eu-logo-mark { width: 32px; height: 32px; }
  .eu-logo-mark span { width: 25px; height: 25px; font-size: 18px; }
}

/* Barra de temas: só os que cabem + "Todos os temas" */
.eu-themebar-inner { overflow: hidden !important; flex-wrap: nowrap; justify-content: center; }
@media (max-width: 767px) {
  .eu-themebar-inner { overflow-x: auto !important; justify-content: flex-start; }
  .eu-theme-more { margin-left: 0; }
}
#searchButton.eu-search-btn { background: rgba(255, 255, 255, .16) !important; color: #fff !important; width: auto !important; height: auto !important; border: 1px solid rgba(255, 255, 255, .3) !important; box-shadow: none !important; }
#searchButton.eu-search-btn .material-symbols-rounded { color: #fff !important; display: inline-block !important; }
.eu-theme-chip[hidden] { display: none !important; }
.eu-theme-more { border: 0; background: var(--eh-brand); color: #fff; margin-left: auto; }
.eu-theme-more:hover { background: var(--eh-brand-dark); color: #fff; }

/* ---------- Cores: fundo lilás no conteúdo, rodapé com o degradê do header ---------- */
[data-bs-theme="light"] body, body.is-light-theme { background-color: #f1eafe !important; }
footer.bd-footer { background: linear-gradient(90deg, #5e1fe0 0%, #7b3cff 60%, #8f5bff 100%) !important; color: #fff !important; }
footer.bd-footer .text-body-secondary, footer.bd-footer li, footer.bd-footer .footer-subtitle-site { color: #fff !important; }
footer.bd-footer a { color: #fff !important; }
footer.bd-footer a:hover { color: #fff !important; opacity: .85; }
footer.bd-footer .a-footer-social svg, footer.bd-footer .a-footer-social svg path { fill: #fff !important; color: #fff !important; }
.eu-footer-logo-wrap a.eu-logo--dark, .eu-footer-logo-wrap a.eu-logo--dark:hover { color: #fff !important; }
.eu-footer-logo-wrap .eu-logo--dark .eu-logo-text small { color: #fff !important; opacity: .78; }

/* ---------- Páginas de categoria ---------- */
.eu-cat .breadcrumb { padding: 10px 16px !important; margin: 0 0 18px !important; background: #fff; border: 1px solid var(--eh-card-border); border-radius: 12px; box-shadow: var(--eh-shadow); }
.eu-cat-head { margin: 0 0 22px; }
.eu-cat-title { font-size: 37.36px; font-weight: 500; line-height: 1.2; margin: 0 0 8px; }
.eu-cat-desc { color: var(--eh-muted); max-width: 900px; }
.eu-cat-desc p { margin: 0 0 6px; }
.eu-cat-count { color: var(--eh-muted); font-size: .92rem; margin: 4px 0 0; }
.eu-cat-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (min-width: 1200px) { .eu-cat-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 575px) { .eu-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .eu-cat-title { font-size: 1.7rem; } }

/* ---------- Página de impressão (nativa e NextGEN) ---------- */
.eu-print .breadcrumb { padding: 10px 16px !important; margin: 0 0 18px !important; background: #fff; border: 1px solid var(--eh-card-border); border-radius: 12px; box-shadow: var(--eh-shadow); }
#desenho-figura.eu-print-figure, #desenho-figura.eu-print-figure.loaded, #desenho-figura.eu-print-figure.loading { border: 1px solid var(--eh-card-border) !important; transition: none !important; }
.eu-print-main { max-width: 442px; margin: 0 auto 14px; }
.eu-print-figure.loading::before, .eu-print-figure.loading::after, #desenho-figura.eu-print-figure::before, #desenho-figura.eu-print-figure::after { display: none !important; content: none !important; animation: none !important; }
.eu-print-figure, #desenho-figura.eu-print-figure { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
.eu-print-figure { margin: 0 !important; padding: 18px; background: #fff; border: 1px solid var(--eh-card-border); border-radius: 16px; box-shadow: var(--eh-shadow); text-align: center; }
.eu-print-figure img, #desenho-figura.eu-print-figure img { display: block; margin: 0 auto !important; width: 100% !important; max-width: 100% !important; height: auto !important; max-height: 64vh !important; object-fit: contain; }
.eu-print-actions { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 16px 0 0 !important; float: none !important; width: auto !important; }
.eu-print-btn { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; padding: 11px 20px !important; border-radius: 999px !important; border: 1px solid var(--eh-card-border) !important; background: #fff !important; color: var(--eh-text) !important; font-weight: 600; font-size: .98rem; text-decoration: none !important; line-height: 1; cursor: pointer; box-shadow: var(--eh-shadow); }
.eu-print-btn .material-symbols-rounded { font-size: 22px; margin: 0 !important; }
.eu-print-btn:hover { border-color: var(--eh-brand) !important; color: var(--eh-brand) !important; }
.eu-print-btn-main { background: var(--eh-brand) !important; border-color: var(--eh-brand) !important; color: #fff !important; }
.eu-print-btn-main:hover { background: var(--eh-brand-dark) !important; color: #fff !important; }
.eu-print-ad { max-width: 820px; margin: 0 auto 8px; }
.eu-print-more { margin: 4px 0 20px; padding-top: 16px; border-top: 1px solid var(--eh-card-border); }
.eu-print-more h2 { font-size: 37.36px; font-weight: 500; line-height: 1.2; margin: 0 0 16px; }
.eu-print-more-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.eu-print-more-item { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; padding: 10px; background: #fff; border: 1px solid var(--eh-card-border); border-radius: 14px; box-shadow: var(--eh-shadow); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.eu-print-more-item:hover { transform: translateY(-3px); box-shadow: var(--eh-shadow-hover); }
.eu-print-more-item img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; object-fit: contain; }
.eu-print-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; color: var(--eh-brand); text-decoration: none; }
.eu-print-all .material-symbols-rounded { font-size: 20px; }
@media (max-width: 991px) { .eu-print-more-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .eu-print-more-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .eu-print-more h2 { font-size: 1.6rem; } .eu-print-figure { padding: 10px; } .eu-print-btn { flex: 1 1 auto; justify-content: center; } }

/* Header rola junto com a página (não fica fixo) */
.container-header.sticky-top { position: relative !important; top: auto !important; }

/* Single: título "Outros desenhos..." igual ao H1 e mais perto da galeria */
.single .eu-related { margin: 12px 0 20px !important; padding-top: 18px !important; }
.single .eu-related h2 { font-family: inherit !important; font-size: 37.36px !important; font-weight: 500 !important; line-height: 1.2 !important; margin: 0 0 16px !important; }
@media (max-width: 767px) { .single .eu-related h2 { font-size: 1.6rem !important; } }

/* Emojis convertidos em imagem pelo WordPress (ex.: coração do rodapé) */
img.emoji { display: inline !important; width: 1em !important; height: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; border: none !important; box-shadow: none !important; background: none !important; padding: 0 !important; }

/* ---------- Single post: só breadcrumb, título, descrição e galeria ---------- */
.single .entry-header .thumbnail, .single .entry-header .post-thumbnail { display: none !important; }
.single .entry-header { width: 100%; }
.single .entry-header .desenho { display: block !important; height: auto !important; }
.single .entry-header .entry-title { max-width: none !important; margin: 4px 0 8px !important; text-align: left; }
.single .breadcrumb { padding: 10px 16px !important; margin: 0 0 18px !important; background: #fff; border: 1px solid var(--eh-card-border); border-radius: 12px; box-shadow: var(--eh-shadow); }
