/*
Theme Name: Cubexa Blog
Theme URI: https://cubexa.online/
Author: Cubexa
Author URI: https://cubexa.online/
Description: Tema WordPress para o blog do Cubexa, baseado na identidade visual da landing page. Design dark moderno com acentos em roxo e verde, tipografia Inter, e componentes glassmorphism.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: cubexa-blog
Tags: blog, dark, modern, glassmorphism, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ============================================
   DESIGN TOKENS (Baseado na Landing Page)
   ============================================ */
:root {
    /* Colors */
    --bg: #08070d;
    --bg2: #0d0915;
    --panel: #12101a;
    --panel2: #171220;
    --text: #f6f3fb;
    --muted: #aaa1b6;
    --purple: #8b33ff;
    --purple2: #b46cff;
    --line: rgba(255, 255, 255, .09);
    --green: #68f2aa;
    --shadow: 0 32px 90px rgba(0, 0, 0, .45);
    --r: 26px;

    /* Typography */
    --font-main: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --container: 1180px;
    --section-padding: 112px;
    --header-height: 66px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 0%, rgba(139, 51, 255, .11), transparent 30%),
                linear-gradient(180deg, #08070d, #0a0810 45%, #08070d);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .25s ease;
}

a:hover {
    color: var(--purple2);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin: 0 0 .5em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 1.25em;
    color: var(--muted);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    color: var(--text);
    font-weight: 700;
}

em, i {
    font-style: italic;
}

ul, ol {
    margin: 0 0 1.25em;
    padding-left: 1.5em;
    color: var(--muted);
}

li {
    margin-bottom: .5em;
}

blockquote {
    margin: 2em 0;
    padding: 1.5em 2em;
    border-left: 3px solid var(--purple);
    background: var(--panel);
    border-radius: 0 var(--r) var(--r) 0;
    font-size: 1.15em;
    font-style: italic;
    color: var(--text);
}

blockquote p:last-child {
    margin-bottom: 0;
}

code, pre {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: .9em;
    background: var(--panel2);
    border-radius: 8px;
}

code {
    padding: .2em .5em;
    color: var(--purple2);
}

pre {
    padding: 1.25em 1.5em;
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid var(--line);
}

pre code {
    padding: 0;
    background: none;
    color: var(--text);
}

hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 3em 0;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 14px;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform .3s ease;
}

.site-header.scrolled {
    transform: translateY(-100%);
}

.nav-shell {
    height: var(--header-height);
    border: 1px solid var(--line);
    background: rgba(10, 8, 16, .72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 14px 0 18px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, .25);
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--text);
    text-decoration: none;
}

.brand img {
    border-radius: 9px;
    width: 38px;
    height: 38px;
    margin-right: 8px;
}

.brand span {
    margin-left: 4px;
}

.nav {
    display: flex;
    gap: 28px;
    margin-inline: auto;
    color: #c9c1d3;
    font-size: 14px;
    list-style: none;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav a {
    color: #c9c1d3;
    transition: color .25s ease;
    text-decoration: none;
}

.nav a:hover {
    color: white;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: .3s;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .25s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--purple);
    color: white;
    box-shadow: 0 8px 24px rgba(139, 51, 255, .35);
}

.btn-primary:hover {
    background: var(--purple2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 51, 255, .45);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--panel);
    border-color: var(--purple);
    color: var(--text);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-outline:hover {
    border-color: var(--purple);
    background: rgba(139, 51, 255, .08);
}

.btn-accent {
    background: var(--green);
    color: #08070d;
    font-weight: 700;
}

.btn-accent:hover {
    background: #7fffc0;
    color: #08070d;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 16px;
}

.btn.full {
    width: 100%;
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.glass-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 2em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .3s ease, border-color .3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 51, 255, .3);
}

.feature-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 2em;
    transition: transform .3s ease, border-color .3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 51, 255, .3);
}

.feature-card .icon {
    font-size: 2em;
    margin-bottom: .5em;
    display: block;
}

.feature-card h3 {
    margin-bottom: .5em;
}

/* ============================================
   EYEBROW & BADGES
   ============================================ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--purple2);
    margin-bottom: 1em;
}

.eyebrow span {
    width: 24px;
    height: 2px;
    background: var(--purple);
    display: inline-block;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(139, 51, 255, .15);
    border: 1px solid rgba(139, 51, 255, .3);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--purple2);
}

.pill {
    display: inline-block;
    padding: 4px 12px;
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

/* ============================================
   POST CARDS (Blog Grid)
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-top: 3em;
}

.post-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    transition: transform .3s ease, border-color .3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 51, 255, .3);
}

.post-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--panel2);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

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

.post-card-content {
    padding: 1.5em;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: .75em;
}

.post-card-meta .category {
    color: var(--purple2);
    font-weight: 600;
}

.post-card h3 {
    font-size: 1.25rem;
    margin-bottom: .5em;
}

.post-card h3 a {
    color: var(--text);
}

.post-card h3 a:hover {
    color: var(--purple2);
}

.post-card p {
    font-size: 14px;
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25em;
    padding-top: 1em;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.read-more {
    color: var(--purple2);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.read-more:hover {
    color: var(--purple);
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post-header {
    padding: 180px 0 60px;
    text-align: center;
}

.single-post-header .post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 1.5em;
}

.single-post-header .post-meta .category {
    color: var(--purple2);
    font-weight: 600;
}

.single-post-header h1 {
    max-width: 800px;
    margin-inline: auto;
}

.single-post-featured-image {
    max-width: 900px;
    margin: 0 auto 3em;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
}

.single-post-content {
    max-width: 720px;
    margin-inline: auto;
    font-size: 1.1rem;
    line-height: 1.75;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin-top: 2em;
    margin-bottom: .75em;
}

.single-post-content img {
    border-radius: var(--r);
    margin: 2em 0;
}

.single-post-content a {
    color: var(--purple2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-post-content a:hover {
    color: var(--purple);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--line);
}

.post-tags a {
    padding: 6px 14px;
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 13px;
    color: var(--muted);
    transition: all .25s ease;
}

.post-tags a:hover {
    border-color: var(--purple);
    color: var(--purple2);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    max-width: 720px;
    margin: 4em auto 0;
    padding-top: 3em;
    border-top: 1px solid var(--line);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5em;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 1.5em;
    margin-bottom: 1em;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: .75em;
}

.comment-author {
    font-weight: 700;
    color: var(--text);
}

.comment-date {
    font-size: 13px;
    color: var(--muted);
}

.comment-form {
    margin-top: 2em;
}

.comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: .5em;
    color: var(--text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--font-main);
    font-size: 15px;
    transition: border-color .25s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--purple);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .submit {
    margin-top: 1em;
}

/* ============================================
   SIDEBAR & WIDGETS
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.widget {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 1.5em;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1em;
    padding-bottom: .75em;
    border-bottom: 1px solid var(--line);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: .5em 0;
    border-bottom: 1px solid var(--line);
    margin: 0;
}

.widget ul li:last-child {
    border-bottom: 0;
}

.widget ul li a {
    color: var(--muted);
    font-size: 14px;
}

.widget ul li a:hover {
    color: var(--purple2);
}

.widget_search .search-form {
    display: flex;
    gap: 8px;
}

.widget_search input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
}

.widget_search input[type="search"]:focus {
    outline: none;
    border-color: var(--purple);
}

.widget_search button {
    padding: 10px 16px;
    background: var(--purple);
    border: 0;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4em;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    transition: all .25s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--purple);
    border-color: var(--purple);
    color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    margin-top: var(--section-padding);
    border-top: 1px solid var(--line);
    background: var(--bg2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
}

.footer-brand p {
    font-size: 14px;
    margin-top: 1em;
}

.footer-brand small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: .5em;
}

.footer-col strong {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1em;
    color: var(--text);
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--muted);
    padding: .35em 0;
}

.footer-col a:hover {
    color: var(--purple2);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

/* ============================================
   SEARCH & ARCHIVE HEADERS
   ============================================ */
.archive-header {
    padding: 180px 0 40px;
    text-align: center;
}

.archive-header .archive-title {
    font-size: clamp(2rem, 4vw, 3rem);
}

.archive-header .archive-description {
    max-width: 600px;
    margin: 1em auto 0;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
    padding: 200px 0;
    text-align: center;
}

.error-404 h1 {
    font-size: clamp(4rem, 10vw, 8rem);
    background: linear-gradient(135deg, var(--purple), var(--purple2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .25em;
}

/* ============================================
   WHATSAPP FLOAT
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
    z-index: 90;
    transition: transform .3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* ============================================
   NOISE & CURSOR GLOW (Decorative)
   ============================================ */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .025;
    z-index: 999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.cursor-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 51, 255, .12), transparent 68%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    transition: opacity .3s;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 980px) {
    :root {
        --section-padding: 80px;
    }

    .nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav.active {
        display: flex;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 8, 16, .95);
        backdrop-filter: blur(22px);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 20px;
        gap: 16px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .single-post-header {
        padding: 140px 0 40px;
    }
}

@media (max-width: 600px) {
    :root {
        --section-padding: 60px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .nav-shell {
        padding: 0 12px;
    }

    .brand span {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 10px 16px;
    background: var(--purple);
    color: white;
    border-radius: 8px;
    z-index: 1000;
    clip: auto;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 10px;
    padding: 10px 16px;
    background: var(--purple);
    color: white;
    border-radius: 8px;
    z-index: 1000;
    transition: top .3s ease;
}

.skip-link:focus {
    top: 10px;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}

/* ============================================
   BLOCK EDITOR STYLES
   ============================================ */
.wp-block-image img {
    border-radius: var(--r);
}

.wp-block-quote {
    border-left: 3px solid var(--purple);
    padding-left: 1.5em;
    font-style: italic;
}

.wp-block-quote cite {
    display: block;
    margin-top: .75em;
    font-size: .85em;
    color: var(--muted);
    font-style: normal;
}

.wp-block-code {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.25em 1.5em;
}

.wp-block-code code {
    background: none;
    padding: 0;
    color: var(--text);
}

.wp-block-pullquote {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 2em 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.wp-block-separator {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 3em 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .whatsapp-float,
    .noise,
    .cursor-glow,
    .comments-area,
    .site-footer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
