/*
Theme Name:  niux Novedades
Theme URI:   http://novedades.niux.com.ar
Author:      niux.com.ar
Author URI:  http://niux.com.ar
Description: Theme minimalista para novedades.niux.com.ar — noticias, actualizaciones y novedades técnicas.
Version:     1.0.0
License:     GNU General Public License v2
Text Domain: niux-novedades
*/

/* ── Reset básico ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ───────────────────────────────── */
:root {
    --bg:        #0d1117;
    --bg-card:   #161b22;
    --border:    #30363d;
    --green:     #4CAF35;
    --blue:      #1976C8;
    --text:      #e6edf3;
    --muted:     #8b949e;
    --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ── Base ────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Layout ──────────────────────────────────── */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Header / Nav ────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    max-width: 1100px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    text-decoration: none;
}
.site-logo img { height: 26px; width: auto; }
.site-logo .badge {
    font-size: 0.7rem;
    font-family: monospace;
    color: var(--green);
    border: 1px solid rgba(76,175,53,.3);
    padding: 1px 6px;
    border-radius: 4px;
}

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
    font-size: 0.875rem;
    color: var(--muted);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
    text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.site-nav a.back-link {
    color: var(--green);
    border: 1px solid rgba(76,175,53,.25);
}
.site-nav a.back-link:hover { border-color: rgba(76,175,53,.5); background: rgba(76,175,53,.05); }

/* ── Main content ────────────────────────────── */
.site-main {
    min-height: calc(100vh - 56px - 64px);
    padding: 3rem 0;
}

/* ── Posts list ──────────────────────────────── */
.posts-list { display: flex; flex-direction: column; gap: 1px; }

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    transition: border-color .18s, transform .18s;
}
.post-card:hover {
    border-color: rgba(76,175,53,.35);
    transform: translateY(-1px);
}

.post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
    font-family: monospace;
}
.post-card .post-meta .cat {
    color: var(--green);
    border: 1px solid rgba(76,175,53,.25);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.post-card h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--green); }

.post-card .post-excerpt {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--green);
    font-weight: 500;
}
.read-more:hover { text-decoration: underline; }

/* ── Single post ─────────────────────────────── */
.single-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2.5rem;
}
@media (max-width: 600px) {
    .single-post { padding: 1.5rem 1.25rem; border-radius: 12px; }
}

.single-post .post-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.single-post .post-header .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--muted);
    font-family: monospace;
    margin-bottom: 0.75rem;
}
.single-post .post-header .post-meta .cat {
    color: var(--green);
    border: 1px solid rgba(76,175,53,.25);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.single-post h1 {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}

/* Content typography */
.entry-content { font-size: 0.95rem; line-height: 1.8; }
.entry-content h2 { font-size: 1.2rem; font-weight: 600; margin: 2rem 0 0.75rem; color: var(--text); }
.entry-content h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--text); }
.entry-content p  { margin-bottom: 1.1rem; color: var(--text); }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.1rem; color: var(--text); }
.entry-content li { margin-bottom: 0.3rem; }
.entry-content a  { color: var(--green); }
.entry-content a:hover { text-decoration: underline; }
.entry-content blockquote {
    border-left: 3px solid var(--green);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--muted);
    font-style: italic;
}
.entry-content pre, .entry-content code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85rem;
    background: rgba(0,0,0,.4);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.entry-content code { padding: 2px 6px; }
.entry-content pre {
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.entry-content pre code { background: none; border: none; padding: 0; }
.entry-content img { border-radius: 8px; border: 1px solid var(--border); margin: 1rem 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: 0.9rem; }
.entry-content th, .entry-content td {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    text-align: left;
}
.entry-content th { background: rgba(255,255,255,.03); font-weight: 600; }

/* ── Pagination ──────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}
.pagination a, .pagination span {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--muted);
    text-decoration: none;
    transition: border-color .15s, color .15s;
}
.pagination a:hover { border-color: var(--green); color: var(--text); }
.pagination .current { border-color: var(--green); color: var(--green); }

/* ── Page header ─────────────────────────────── */
.page-header {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.page-header p { color: var(--muted); font-size: 0.95rem; }

/* ── Footer ──────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
}
.site-footer .container {
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--green); }

/* ── No posts / 404 ──────────────────────────── */
.no-posts {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--muted);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
    .site-nav .hide-mobile { display: none; }
    .single-post h1 { font-size: 1.35rem; }
    .page-header h1 { font-size: 1.3rem; }
}
