/*
Theme Name: Vírgula Contábil__Claude_V3
Theme URI: https://virgulacontabil.com.br
Author: Vírgula Contábil
Author URI: https://virgulacontabil.com.br
Description: Tema institucional moderno focado em alta performance e contabilidade digital. Baseado em Tailwind CSS.
Version: 6.2.2
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: virgula-contabil
*/

/*
 * O visual principal é gerado pelo Tailwind CSS (Play CDN, configurado no header.php).
 * Este arquivo cobre o que o Tailwind não resolve: integração com o WordPress,
 * conteúdo de artigos (.prose), acessibilidade e alguns componentes nativos.
 */

/* ==========================================================================
   1. Barra de admin
   ========================================================================== */
.admin-bar #masthead {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar #masthead {
        top: 46px;
    }
}
.admin-bar #masthead.is-stuck {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar #masthead.is-stuck {
        top: 46px;
    }
}

/* ==========================================================================
   2. Header inteligente (classe alternada via assets/js/custom.js)
   ========================================================================== */
#masthead.is-stuck {
    position: fixed;
    top: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -12px rgba(2, 44, 34, 0.15);
}

/* ==========================================================================
   3. Acessibilidade
   ========================================================================== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    padding: 0.75rem 1.25rem;
    background: #022c22;
    color: #fff;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
    border-radius: 2px;
}

/* O <main> recebe foco pelo skip-link, mas não deve exibir contorno. */
#content:focus,
#content:focus-visible {
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   4. Scrollbar (tema claro)
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}

/* ==========================================================================
   5. Alinhamentos que o editor do WordPress injeta
   ========================================================================== */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.alignright {
    float: right;
    margin: 0 0 1.5em 1.5em;
}
.alignleft {
    float: left;
    margin: 0 1.5em 1.5em 0;
}
.wp-caption {
    max-width: 100%;
}
.wp-caption-text {
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    margin-top: 0.5rem;
}

/* ==========================================================================
   6. Conteúdo do artigo (.prose)
   O plugin typography (Play CDN) faz o grosso do trabalho. Aqui reforçamos
   o que precisa aparecer mesmo se o CDN falhar e aplicamos a cor da marca.
   ========================================================================== */
.prose p {
    margin-bottom: 1.5em;
}
.prose ul {
    list-style-type: disc !important;
    padding-left: 1.5em !important;
    margin-bottom: 1.5em;
}
.prose ol {
    list-style-type: decimal !important;
    padding-left: 1.5em !important;
    margin-bottom: 1.5em;
}
.prose li {
    margin-bottom: 0.5em;
    padding-left: 0.2em;
}
.prose li::marker {
    color: #f97316; /* virgula-orange */
    font-weight: 700;
}
.prose blockquote {
    border-left: 4px solid #f97316;
    padding-left: 1em;
    font-style: italic;
    opacity: 0.85;
}
.prose img {
    border-radius: 0.75rem;
}
.prose a {
    text-underline-offset: 2px;
}
.prose table {
    display: block;
    overflow-x: auto;
}

/* ==========================================================================
   7. Componentes nativos do WP reaproveitados no tema
   ========================================================================== */

/* Rolagem infinita dos cards do blog (front-page) */
.hover\:paused:hover {
    animation-play-state: paused;
}

/* Paginação — the_posts_pagination() / paginate_links() */
.virgula-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.virgula-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    background-color: #fff;
    color: #334155;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.virgula-pagination .page-numbers:hover {
    background-color: #fff7ed;
    color: #f97316;
    border-color: #f97316;
}
.virgula-pagination .page-numbers.current,
.virgula-pagination .page-numbers.current:hover {
    background-color: #f97316;
    color: #fff;
    border-color: #f97316;
}
.virgula-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* Lista de categorias (template-blog.php / widget) */
.blog-categories-list li {
    margin-bottom: 0.75rem;
}
.blog-categories-list a {
    color: #64748b;
    font-weight: 500;
    transition: color 0.2s ease;
}
.blog-categories-list a:hover {
    color: #f97316;
}

/* Formulário de busca nativo (get_search_form / html5) */
.wp-block-search__inside-wrapper {
    gap: 0.5rem;
}

/* ==========================================================================
   8. Comentários (comments.php + comment_form nativo)
   ========================================================================== */
.comments-area .comment-list,
.comments-area .comment-list ol.children {
    list-style: none;
    padding-left: 0;
}
.comments-area .comment-list ol.children {
    margin-top: 1.5rem;
    margin-left: 1.5rem;
    border-left: 2px solid #e2e8f0;
    padding-left: 1.5rem;
}
.comments-area .comment-body {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
}
.comments-area .comment-author {
    font-weight: 600;
    color: #022c22;
}
.comments-area .comment-author .avatar {
    border-radius: 9999px;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.comments-area .comment-metadata,
.comments-area .comment-metadata a {
    font-size: 0.8125rem;
    color: #64748b;
}
.comments-area .comment-content {
    margin-top: 0.5rem;
    color: #334155;
}
.comments-area .reply a,
.comments-area .comment-reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #f97316;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    color: #334155;
    font: inherit;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 1px #f97316;
}
.comment-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
}
.comment-form .form-submit {
    margin-top: 1rem;
}

/* ==========================================================================
   9. Molduras de produto (showcase comercial da front-page)
   ========================================================================== */

/* Moldura de navegador */
.virgula-browser {
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 40px 80px -30px rgba(2, 44, 34, 0.35), 0 8px 24px -12px rgba(2, 44, 34, 0.12);
}
.virgula-browser__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.virgula-browser__dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    display: block;
}

/* Moldura de celular */
.virgula-phone {
    position: relative;
    width: 100%;
    max-width: 270px;
    margin-inline: auto;
    border-radius: 2.25rem;
    padding: 0.55rem;
    background: linear-gradient(160deg, #043d30, #022c22);
    box-shadow: 0 40px 70px -25px rgba(2, 44, 34, 0.45), 0 6px 18px -8px rgba(2, 44, 34, 0.25);
}
.virgula-phone__screen {
    position: relative;
    border-radius: 1.7rem;
    overflow: hidden;
    background: #fff;
}
.virgula-phone__screen img {
    display: block;
    width: 100%;
    height: auto;
}
.virgula-phone::before {
    content: "";
    position: absolute;
    top: 0.9rem;
    left: 50%;
    transform: translateX(-50%);
    width: 34%;
    height: 0.5rem;
    background: #022c22;
    border-radius: 9999px;
    z-index: 2;
}

@media (min-width: 768px) {
    .virgula-phone--tilt-l { transform: rotate(-4deg); }
    .virgula-phone--tilt-r { transform: rotate(4deg); }
    .virgula-phone--raise  { margin-top: -2.5rem; }
}

/* Halo suave atrás dos showcases */
.virgula-halo::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    top: 10%;
    margin-inline: auto;
    width: min(90%, 60rem);
    height: 60%;
    background: radial-gradient(closest-side, rgba(16, 185, 129, 0.14), transparent);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}
