.menu-color {
    color: var(--header-text);
}

.menu-color:hover {
    color: var(--header-text);
}

html.scroll-locked,
body.scroll-locked {
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: none;
}

/* animações */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
       ESTILOS DO HEADER COM SUPORTE A TEMA ESCURO
       Nota: Carrega APÓS o Tailwind para sobrescrever
       ======================================== */
html body header {
    background: var(--header-bg, #ffffff);
    border-color: var(--header-border, rgb(229 231 235 / 0.6));
}

html body header input[type="search"] {
    background-color: var(--header-input-bg, #ffffff);
    color: var(--header-text, #1f2937);
    border-color: var(--header-border, #d1d5db);
}

html body header input[type="search"]::placeholder {
    color: rgba(156, 163, 175, 0.8);
    opacity: 1;
}

/* Botões e links do header */
html body header button,
html body header a {
    color: var(--header-text, #374151);
}

html body header button:hover,
html body header a:hover {
    color: var(--header-text-hover, #111827);
}

/* Ícones reutilizáveis */
.icon {
    display: inline-block;
    flex-shrink: 0;
    color: inherit;
    background-color: currentColor;
    mask: var(--icon-mask) center/contain no-repeat;
    -webkit-mask: var(--icon-mask) center/contain no-repeat;
}

/* SVG icons no header */
html body header .icon {
    color: var(--header-text-muted, #6b7280);
}

html body header .menu-color .icon {
    color: inherit;
}

html body header .menu-color:hover .icon {
    color: inherit;
}

html body header button:hover .icon,
html body header a:hover .icon {
    color: var(--header-text, #111827);
}

/* Footer assume tema quando --header-bg é definido */
html body footer.site-footer {
    background: var(--footer-bg, var(--header-bg, #ffffff));
    border-color: var(--footer-border, var(--header-border, rgb(229 231 235 / 0.6)));
    color: var(--footer-text, color-mix(in srgb, var(--header-bg) 0%, #ffffffda 100%));
}

html body footer.site-footer h4,
html body footer.site-footer strong {
    color: var(--footer-heading, color-mix(in srgb, var(--header-bg) 0%, #ffffffda 100%));
}

html body footer.site-footer p,
html body footer.site-footer li,
html body footer.site-footer span,
html body footer.site-footer small {
    color: var(--footer-text, color-mix(in srgb, var(--header-bg) 0%, #ffffffda 100%));
}

html body footer.site-footer a {
    color: var(--footer-link, color-mix(in srgb, var(--header-bg) 0%, #ffffffda 100%));
}

html body footer.site-footer a:hover {
    color: var(--footer-link-hover, var(--primary));
}

html body footer.site-footer .footer-logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--footer-bg, var(--header-bg, #f9fafb)) 88%, rgba(255, 255, 255, 0.1) 12%);
    border: 1px solid color-mix(in srgb, var(--footer-border, var(--header-border, rgba(255, 255, 255, 0.25))) 45%, transparent);
    box-shadow: 0 8px 26px -18px rgba(0, 0, 0, 0.35);
}

html body footer.site-footer .footer-logo {
    height: clamp(3rem, 5vw, 3.6rem);
    width: auto;
    max-width: 220px;
    /*filter: var(--footer-logo-filter, drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18)));*/
}

html body footer.site-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    padding: 0.25rem 0.4rem;
}

html body footer.site-footer .footer-brand-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    html body footer.site-footer .footer-brand-group {
        align-items: center;
    }
}

html body footer.site-footer .footer-brand-name {
    font-size: clamp(1.35rem, 2vw + 0.5rem, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: inherit;
}

html body footer.site-footer .footer-brand-tagline {
    margin-top: 0.35rem;
    display: block;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

@media (min-width: 768px) {
    html body footer.site-footer .footer-brand-tagline {
        text-align: center;
    }
}

.icon-search {
    --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.icon-menu {
    --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3.75 9h16.5M3.75 15h16.5'/%3E%3C/svg%3E");
}

.icon-pin {
    --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 2a6 6 0 016 6c0 4.418-6 10-6 10S4 12.418 4 8a6 6 0 016-6z'/%3E%3C/svg%3E");
}

.icon-arrow-right {
    --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M12.293 2.293a1 1 0 011.414 0L18 6.586l-4.293 4.293a1 1 0 01-1.414-1.414L14.586 7H7a1 1 0 100 2h7.586l-2.293 2.293a1 1 0 101.414 1.414L18 8.414l-4.293-4.293a1 1 0 010-1.414z'/%3E%3C/svg%3E");
}

.icon-cta {
    --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23ffffff1A' stroke='%23fff'/%3E%3Cpath d='M9 8l6 4-6 4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.icon-shield-check {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2300a87a' d='M12 22c-.38 0-8-3.76-8-10V5l8-3 8 3v7c0 6.24-7.62 10-8 10z'/%3E%3Cpath d='M8.5 12.5l2.5 2.5 5-5' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Controle do menu desktop inline (ativado via JS) */
.desktop-inline-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-inline-nav.desktop-inline-nav--visible {
        display: flex;
    }
}

.desktop-dropdown-wrapper {
    display: none;
}

@media (min-width: 768px) {
    .desktop-dropdown-wrapper.desktop-dropdown-wrapper--visible {
        display: block;
    }
}

.desktop-search-form {
    display: none;
}

@media (min-width: 768px) {
    .desktop-search-form.desktop-search-form--visible {
        display: flex;
    }
}

.desktop-search-trigger {
    display: none;
}

@media (min-width: 768px) {
    .desktop-search-trigger.desktop-search-trigger--visible {
        display: inline-flex;
    }
}

.toc,
.latest-posts {
    position: relative;
}

@media (min-width: 1024px) {

    .toc,
    .latest-posts {
        position: sticky;
    }
}

.toc::before,
.latest-posts::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary-lighter));
    opacity: 0.9;
}



.toc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.625rem;
    background: transparent;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    color: #4b5563;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.toc-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
    border-radius: 2px;
    transition: height 0.2s ease;
}

.toc-link:hover,
.toc-link:focus-visible {
    background: var(--primary-bg-hover);
    color: var(--primary-text);
    padding-left: 1.1rem;
    outline: none;
}

.toc-link:hover::before,
.toc-link:focus-visible::before {
    height: 60%;
}

.toc-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.toc-link:hover .toc-index,
.toc-link:focus-visible .toc-index {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.05);
}

.latest-post-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: #ffffff;
    text-decoration: none;
    color: #111827;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f2f9;
    position: relative;
}

.latest-post-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    padding: 1px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.latest-post-card:hover,
.latest-post-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-hover);
    border-color: #dfe4f3;
    outline: none;
}

.latest-post-card:hover::after,
.latest-post-card:focus-visible::after {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    opacity: 0.4;
}

.latest-post-card img {
    width: 68px;
    height: 68px;
    border-radius: 0.625rem;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.latest-post-card:hover img {
    transform: scale(1.05);
}

/* Animação contínua de brilho no CTA */
@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-shine {
    animation: shine 3s ease-in-out infinite;
}

/* CTA Sticky Bottom - oculto por padrão */
#stickyBottomCTA {
    transform: translateY(100%) !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#stickyBottomCTA.visible {
    transform: translateY(0) !important;
}

/* Pulso sutil no botão */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 168, 122, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 168, 122, 0);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* estilização de conteúdo WYSIWYG */
.wysiwyg-content h1 {
    font-size: 1.875rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    /* reduzido */
}

.wysiwyg-content h2 {
    /* reduzido de 1.5rem */
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
}

.wysiwyg-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

.wysiwyg-content p:not(:first-of-type) {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.wysiwyg-content ul,
.wysiwyg-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
    /* bolinhas */
}

.wysiwyg-content li {
    margin-bottom: 0.5rem;
}

.wysiwyg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.wysiwyg-content th,
.wysiwyg-content td {
    border: 1px solid #E5E7EB;
    padding: 0.5rem;
    text-align: left;
}

.wysiwyg-content blockquote {
    border-left: 4px solid #D1D5DB;
    padding-left: 1rem;
    color: #6B7280;
    margin: 1rem 0;
}


@media (max-width: 768px) {
    .wysiwyg-content h1 {
        font-size: 1.35rem;
        /* menor no mobile */
        font-weight: 500;
        /* menos bold */
        line-height: 1.2;
    }

    .wysiwyg-content p:not(:first-of-type) {
        font-size: 0.95rem;
        /* menor no mobile */
    }

    .wysiwyg-content h2 {
      
        /* reduzido de 1.5rem */
        font-weight: 500;

    }

    .wysiwyg-content h3 {
        font-size: 1.05rem;
        font-weight: 500;

    }
}

/* dropdown e drawer sobre anúncios */
#desktopDropdown {
    z-index: 50;
}

#mobileDrawer {
    z-index: 50;
}

/* Ajustes para posts relacionados */
.related-posts .p-2 {
    font-size: 1rem;
    /* aumenta de text-sm para text-base */
}

.related-posts img {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    margin: 0;
}

#pagePreloader {
    z-index: 9999;
}

#pagePreloader .preloader-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 45%, white) 100%);
    transform-origin: left;
    transform: scaleX(0);
    opacity: 1;
    animation: preloader-bar-fill 1.4s ease-out forwards;
    will-change: transform;
}

@keyframes preloader-bar-fill {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

@keyframes preloader-shimmer {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0%);
    }
}

@keyframes spin-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes dot-pulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}
.footer-rail {
  /* basea tudo em variáveis locais p/ ajustar só aqui */
  --ink: var(--footer-text, #374151);
  --rail: color-mix(in srgb, currentColor 12%, transparent); /* antes 18% */
  --tick: color-mix(in srgb, currentColor 10%, transparent); /* antes 14% */

  color: var(--ink);
  position: relative;
  margin-left: .75rem;
  padding-left: 1rem;
  border-left: 1px solid var(--rail);
}

.footer-rail li { position: relative; }

/* traço horizontal mais leve */
.footer-rail li::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 50%;
  width: .65rem;
  height: 2px;
  background: var(--tick);
  transform: translateY(-50%);
}

/* título: ponto com a cor primária exata */
.footer-rail-title {
  display: flex; align-items: center; gap: .5rem;
  color: var(--footer-heading, inherit);
}
.footer-rail-title::before {
  content: "";
  width: .5rem; height: .5rem; border-radius: 9999px;
  background: var(--primary); /* <<< primary exata */
  /* anel bem sutil que funciona em fundo claro */
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 8%, transparent);
}

/* links: discretos; hover usa sua --primary */
.footer-rail a {
  color: var(--footer-link, currentColor);
  text-decoration: none;
  transition: color .2s ease, text-underline-offset .2s ease, opacity .2s ease;
  opacity: .9;
}
.footer-rail a:hover,
.footer-rail a:focus-visible {
  color: var(--footer-link-hover, var(--primary));
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 1;
}