/*
Theme Name: GlobalCore
Theme URI: https://guiamundotec.com/
Author: Guía Mundo Tec
Author URI: https://guiamundotec.com/
Description: Tema ultraligero y modular de alto rendimiento (Zero-Bloat) para revistas técnicas y tutoriales de programación. Optimizado para Core Web Vitals y Google AdSense.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: globalcore
*/

:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --max-w: 1200px;
}

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

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.site-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Encabezado */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-brand a {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.site-nav a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Layout Principal con CSS Grid */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
}

@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

/* Grid de Artículos (Magazine) */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.card-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.06);
}

.card-thumbnail {
    aspect-ratio: 16 / 9;
    background: #e2e8f0;
    overflow: hidden;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.card-title a {
    color: var(--text-main);
    text-decoration: none;
}

.card-excerpt {
    font-size: 0.92rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1rem;
}

/* Single Post */
.post-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.post-header {
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.post-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.post-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.post-body p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.post-body h2, .post-body h3 {
    margin: 2rem 0 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.post-body pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1.5rem 0;
}

.post-body code {
    font-family: var(--font-mono);
    background: #e2e8f0;
    color: #0f172a;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Sidebar & Ads */
.sidebar-slot {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.4rem;
    display: inline-block;
}

.ad-slot {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}
