/* ==========================================================================
   CoreAudit WP - Estilos Generales y Tema Moderno Glassmorphism (Estilo 2)
   ========================================================================== */

:root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(255, 255, 255, 0.05);
    
    --accent: #7c3aed;
    --accent-hover: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #6366f1);
    
    --danger-red: #f87171;
    --success-green: #34d399;
    
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --glow: 0 0 20px rgba(124, 58, 237, 0.25), 0 0 50px rgba(124, 58, 237, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    color: var(--text-primary);
    background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.18), transparent 30%), 
                radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.18), transparent 30%), 
                linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    padding: 0;
    margin: 0;
}

/* Efectos decorativos de fondo (Orbes de luz de Style 2) */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

body::before {
    background: #7c3aed;
    top: -100px;
    left: -100px;
    opacity: 0.25;
}

body::after {
    background: #2563eb;
    bottom: -100px;
    right: -100px;
    opacity: 0.2;
}

/* ==========================================================================
   Estructura Global y Contenedores Alineados
   ========================================================================== */

.nav-container,
.container,
.footer-container,
.footer-bottom {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ==========================================================================
   Navegación (Navbar)
   ========================================================================== */
.navbar {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    padding-top: 1rem;
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.nav-logo {
    width: 28px;
    height: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

/* ==========================================================================
   Contenedor Principal y Header
   ========================================================================== */
.container {
    padding-top: 1rem;
    padding-bottom: 2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.pickaxe-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(124, 58, 237, 0.6));
    animation: pulse-glow 3s infinite ease-in-out;
}

.pickaxe-icon img {
    width: 60px;      
    height: auto;     
    display: block;
    margin: 0 auto;  
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.5)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.8)); }
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff 40%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(124, 58, 237, 0.25);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    letter-spacing: 0;
}

/* Barra de Estado (Glassmorphism de Style 2) */
.status-bar {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.rate-limit-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-hover);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    font-weight: 600;
}

/* Caja de Búsqueda (Estilo Glass Card) */
.search-box {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 2.25rem;
    box-shadow: var(--shadow);
    position: relative;
    transition: all 0.3s ease;
    animation: fadeUp .7s ease;
}

.search-box::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 30%);
    pointer-events: none;
}

.search-box:focus-within {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(124, 58, 237, 0.2);
}

.input-group {
    display: flex;
    gap: 12px;
    width: 100%;
}

input[type="text"] {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: rgba(124, 58, 237, .8);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .15), 0 0 25px rgba(124, 58, 237, .2);
    background: rgba(255, 255, 255, 0.07);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

button.btn-mine {
    background: var(--accent-gradient);
    color: #ffffff;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 0 1.5rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--glow);
}

button.btn-mine:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 0 30px rgba(124, 58, 237, .45), 0 10px 30px rgba(124, 58, 237, .25);
}

button.btn-mine:active:not(:disabled) {
    transform: scale(.96);
}

button.btn-mine:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    box-shadow: none;
}

/* Loader */
.loader {
    display: none;
    text-align: center;
    margin: 2rem 0;
    color: var(--accent-hover);
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(124, 58, 237, 0.15);
    border-left-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Resultados */
#results-container {
    width: 100%;
    margin-top: 2rem;
}

.result-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    animation: fadeUp 0.5s ease-out;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.summary-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
}

/* Items de Vulnerabilidades */
.vuln-item {
    background: rgba(15, 23, 42, 0.6);
    border-left: 4px solid var(--danger-red);
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.vuln-item:hover {
    transform: translateX(4px);
    background: rgba(15, 23, 42, 0.8);
}

.vuln-title {
    color: var(--danger-red);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vuln-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.vuln-url {
    font-size: 0.8rem;
    color: #94a3b8;
    word-break: break-all;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.fix-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-hover);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.fix-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Estado Limpio (Sin Vulnerabilidades) */
.clean-status {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--success-green);
}

.clean-status h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Mensajes de Error */
.error-message, .error-text {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--danger-red);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* ==========================================================================
   Footer Extendido
   ========================================================================== */
.footer {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.footer-info {
    max-width: 380px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.footer-logo {
    width: 24px;
    height: 24px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer-nav h4 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-hover);
}

.footer-bottom {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Animaciones */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo Móvil */
@media (max-width: 600px) {
    .nav-container,
    .container,
    .footer-container,
    .footer-bottom {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .search-box {
        padding: 1.5rem;
        border-radius: 20px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    button.btn-mine {
        padding: 0.8rem;
        justify-content: center;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   Estilos específicos para plantilla de Artículo y Layout Grid con Sidebar
   ========================================================================== */

.container.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
    max-width: 1000px; /* Un poco más ancho para dar espacio al sidebar */
}

/* Ajustes del contenido principal del artículo */
.main-article .result-card {
    margin-bottom: 0;
}

.article-header {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 50%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.article-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-body code {
    background: rgba(0, 0, 0, 0.4);
    color: var(--accent-hover);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Sidebar y Links */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateX(3px);
}

.sidebar-item-title {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
}

.sidebar-item-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.cta-box {
    text-align: center;
}

/* Responsivo para el Grid con Sidebar */
@media (max-width: 850px) {
    .container.article-layout {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    .article-title {
        font-size: 1.5rem;
    }
}
/* ==========================================================================
   Listas Estilizadas
   ========================================================================== */

ol.styled-list {
    list-style: none; /* Quitamos los números por defecto del navegador */
    counter-reset: custom-counter; /* Preparamos un contador personalizado */
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Espaciado uniforme entre elementos */
}

ol.styled-list li {
    counter-increment: custom-counter;
    background: rgba(10, 12, 16, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-left: 3px solid var(--gold-primary);
    border-radius: 6px;
    padding: 0.85rem 1rem 0.85rem 3rem; /* Espacio para el número personalizado */
    position: relative;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.5;
    transition: all 0.2s ease-in-out;
}

/* Efecto Hover estilo mina */
ol.styled-list li:hover {
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateX(4px);
    background: rgba(22, 27, 38, 0.8);
}

/* Números Dorados Personalizados */
ol.styled-list li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    color: var(--amber-accent);
    font-size: 0.95rem;
}

/* Destacado del Nombre del Plugin */
ol.styled-list li strong {
    color: #ffffff;
    font-family: 'Chakra Petch', sans-serif;
    letter-spacing: 0.5px;
    margin-right: 0.25rem;
}

/* ==========================================================================
   Estilos Especiales para Páginas de Artículos (Sin Sidebar)
   ========================================================================== */

/* Ancho óptimo para lectura */
.container-article {
    max-width: 800px;
}

/* Enlace de regreso */
.article-nav {
    width: 100%;
    margin-bottom: 1.5rem;
}

.back-link {
    color: var(--amber-accent);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Metadatos y título */
.article-header {
    text-align: left;
    margin-top: 0;
    margin-bottom: 2rem;
    width: 100%;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-header h1 {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

/* Contenido y Tipografía */
.article-content {
    line-height: 1.7;
    font-size: 0.98rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--text-light);
}

.article-content p.lead {
    font-size: 1.1rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
    padding-bottom: 1.25rem;
}

.article-content h2 {
    font-family: 'Chakra Petch', sans-serif;
    color: var(--gold-primary);
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content code {
    background: rgba(10, 12, 16, 0.8);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--amber-accent);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.88rem;
}

.article-content blockquote {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid var(--gold-primary);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 6px 6px 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}
/* ==========================================================================
   Estilos para la Lista de Artículos (Vista Catálogo)
   ========================================================================== */

.container-blog {
    max-width: 850px;
}

.blog-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Contenedor principal de tarjetas */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

/* Tarjeta individual de artículo */
.article-card {
    background: rgba(16, 20, 29, 0.65);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.25s ease-in-out;
}

.article-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    transform: translateY(-3px);
    background: rgba(22, 27, 38, 0.85);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Etiqueta de Categoría */
.badge {
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber-accent);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.article-card h2 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.article-card h2 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card h2 a:hover {
    color: var(--gold-primary);
}

.article-card p {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--amber-accent);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.article-card:hover .read-more {
    transform: translateX(4px);
    color: var(--gold-primary);
}

/* Estilos para Tablas Comparativas CoreAudit WP */
.comparison-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}

.comparison-table th {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Chakra Petch', sans-serif;
    text-align: left;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.comparison-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.comparison-table code {
    color: var(--accent-color, #00f2fe);
}