/*
Theme Name: MenteNerd
Theme URI: https://mentenerd.com.br
Author: Antigravity
Author URI: https://mentenerd.com.br
Description: Dark Editorial Modern Tech & Geek Portal Theme for MenteNerd with high-performance SEO and Social Ecosystem.
Version: 2.0.0
Requires at least: 6.0
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: mentenerd
Tags: blog, dark, tech, editorial, cyberpunk, seo
*/

:root {
    --bg-primary: #090c10;
    --bg-surface: #11161d;
    --bg-elevated: #171e27;
    --accent-cyan: #00f0ff;
    --accent-green: #00ff9d;
    --accent-pink: #ff0055;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;
}

/* Custom Editorial Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #262f3d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* WordPress Alignment Classes */
.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

/* Editorial Post Content & Typography */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: #ffffff;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    margin-top: 2.5rem !important;
    margin-bottom: 1.15rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.entry-content h2 {
    font-size: 1.875rem;
    border-left: 3px solid var(--accent-cyan);
    padding-left: 0.875rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content p {
    margin-bottom: 1.5rem !important;
    line-height: 1.85;
    color: var(--text-primary);
}

.entry-content a:not(.mn-aff-link) {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.entry-content a:not(.mn-aff-link):hover {
    color: var(--accent-green);
}

.entry-content .mn-affiliate-card a.mn-aff-link {
    text-decoration: none !important;
}

.entry-content .mn-affiliate-card h3.mn-aff-heading {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    border-left: none !important;
    padding-left: 0 !important;
}

.entry-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry-content ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--accent-pink);
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    margin: 2rem 0;
}

.entry-content img {
    height: auto;
    max-width: 100%;
    border-radius: 0.75rem;
    border: 1px solid var(--border-subtle);
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Form Controls & Search Inputs */
input[type="search"],
input[type="text"],
input[type="email"],
textarea {
    background-color: rgba(9, 12, 16, 0.65) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0.75rem !important;
}

input[type="search"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--accent-cyan) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2) !important;
}

::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

/* Header Categories Menu Pills */
#categories-menu li a {
    color: #cbd5e1;
    padding: 0.45rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.02);
    display: inline-block;
}

#categories-menu li a:hover {
    color: #ffffff;
    background-color: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    transform: translateY(-1px);
}

#categories-menu li.current-menu-item a,
#categories-menu li.current-cat a {
    color: #090c10;
    background-color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
    font-weight: 700;
}

/* WordPress Pagination Styling */
.navigation.pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.85rem;
    border-radius: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.navigation.pagination .page-numbers:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.navigation.pagination .page-numbers.current {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #090c10;
    font-weight: 700;
}

/* Featured Carousel Styles */
.featured-carousel .carousel-container {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    height: 100% !important;
    will-change: transform;
}

.featured-carousel .carousel-slide {
    width: 100%;
    min-width: 100% !important;
    flex: 0 0 100% !important;
}

.featured-carousel .slide-content {
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(1rem);
}

.featured-carousel .carousel-slide.active-slide .slide-content {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.carousel-dot.active-dot {
    background-color: var(--accent-cyan) !important;
    width: 2rem !important;
}

/* Logo & Animation */
.logo-brain-fix {
    mix-blend-mode: screen !important;
    filter: brightness(1.1) contrast(1.15);
}

@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.92;
    }
    50% {
        transform: scale(1.04);
        opacity: 1;
        filter: brightness(1.25) drop-shadow(0 0 12px rgba(0, 240, 255, 0.6));
    }
}

/* Utility to hide scrollbars where horizontal overflow is used */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Radar Nerd Infinite Ticker Animation */
.mn-ticker-viewport {
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.mn-ticker-track {
    width: max-content;
    animation: mn-ticker-scroll 38s linear infinite;
}

.mn-ticker-viewport:hover .mn-ticker-track {
    animation-play-state: paused;
}

@keyframes mn-ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

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

/* ==========================================================================
   EDITORIAL PAPER LIGHT MODE (Optional User Toggle via [data-theme="light"])
   Dark Mode remains the default identity.
   ========================================================================== */
html[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --accent-cyan: #0284c7;
    --accent-green: #059669;
    --accent-pink: #e11d48;
    --border-subtle: rgba(15, 23, 42, 0.1);
    --text-primary: #1e293b;
    --text-muted: #64748b;
}

/* Backgrounds & Surfaces in Light Mode */
html[data-theme="light"] body.bg-brand-dark {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

html[data-theme="light"] header.sticky {
    background-color: rgba(255, 255, 255, 0.88) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 20px -5px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .editorial-card,
html[data-theme="light"] .widget,
html[data-theme="light"] footer,
html[data-theme="light"] article.bg-brand-surface\/50,
html[data-theme="light"] .bg-brand-surface,
html[data-theme="light"] .bg-brand-surface\/90,
html[data-theme="light"] .bg-brand-surface\/80,
html[data-theme="light"] .bg-brand-surface\/70,
html[data-theme="light"] .bg-brand-surface\/60,
html[data-theme="light"] .bg-brand-surface\/50 {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .editorial-card:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 12px 30px -8px rgba(2, 132, 199, 0.18) !important;
}

html[data-theme="light"] .bg-brand-dark\/60,
html[data-theme="light"] .bg-brand-dark\/70,
html[data-theme="light"] .bg-brand-dark\/80,
html[data-theme="light"] .bg-brand-elevated {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
}

/* Menu Overlay & Mobile Sticky Bar in Light Mode */
html[data-theme="light"] #menu-overlay {
    background-color: rgba(248, 250, 252, 0.96) !important;
}

html[data-theme="light"] .fixed.bottom-0.bg-brand-dark\/90 {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-top-color: rgba(15, 23, 42, 0.1) !important;
}

/* Typography & Contrast Adjustments (Excluding Hero Banner) */
html[data-theme="light"] h1,
html[data-theme="light"] h2:not(.hero-title),
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] .text-white:not(.hero-title) {
    color: #0f172a !important;
}

html[data-theme="light"] .hero-title,
html[data-theme="light"] .hero-title a {
    color: #ffffff !important;
}

html[data-theme="light"] .hero-title a:hover {
    color: #00f0ff !important;
}

html[data-theme="light"] .text-gray-200:not(.hero-excerpt),
html[data-theme="light"] .text-gray-300,
html[data-theme="light"] .text-brand-text {
    color: #334155 !important;
}

html[data-theme="light"] .text-gray-400,
html[data-theme="light"] .text-gray-500 {
    color: #64748b !important;
}

/* Accents in Light Mode (Readable High-Contrast Tech Tones) */
html[data-theme="light"] .text-brand-neonBlue {
    color: #0284c7 !important;
    filter: none !important;
}

html[data-theme="light"] .text-brand-neonGreen {
    color: #059669 !important;
}

html[data-theme="light"] .text-brand-neonPink {
    color: #e11d48 !important;
}

/* Borders & Dividers in Light Mode */
html[data-theme="light"] .border-white\/\[0\.08\],
html[data-theme="light"] .border-white\/\[0\.06\],
html[data-theme="light"] .border-white\/10 {
    border-color: rgba(15, 23, 42, 0.09) !important;
}

/* Header Controls & Menu Pills in Light Mode */
html[data-theme="light"] #categories-menu li a {
    color: #334155;
    background-color: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] #categories-menu li a:hover {
    color: #0284c7;
    background-color: rgba(2, 132, 199, 0.1);
    border-color: #0284c7;
    box-shadow: none;
}

html[data-theme="light"] #categories-menu li.current-menu-item a,
html[data-theme="light"] #categories-menu li.current-cat a {
    color: #ffffff !important;
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

html[data-theme="light"] #theme-toggle,
html[data-theme="light"] #hamburger-trigger,
html[data-theme="light"] header .bg-white\/\[0\.03\] {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #334155 !important;
}

html[data-theme="light"] #theme-toggle:hover,
html[data-theme="light"] #hamburger-trigger:hover {
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

/* Logo Brain Icon on Light Header */
html[data-theme="light"] .logo-brain-fix {
    mix-blend-mode: normal !important;
    filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.35));
    background-color: #090c10;
    border-radius: 0.75rem;
    padding: 0.2rem;
}

/* Inputs in Light Mode */
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] textarea {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}

/* Article Content in Light Mode */
html[data-theme="light"] .entry-content p,
html[data-theme="light"] .entry-content li {
    color: #1e293b !important;
}

html[data-theme="light"] .entry-content blockquote {
    background: #f1f5f9;
    color: #334155;
}

