/*
Theme Name: Fibo Webs Blog
Theme URI: https://fibowebs.ar
Author: Fibo Webs
Author URI: https://fibowebs.ar
Description: Tema personalizado del blog de Fibo Webs, con identidad visual consistente con fibowebs.ar
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: fibo-webs-blog
*/

/* ─── VARIABLES ─────────────────────────────────────────── */
:root {
  --color-bg:         #0a0a0a;
  --color-surface:    #111111;
  --color-surface-2:  #1a1a1a;
  --color-border:     #2a2a2a;
  --color-accent:     #3b82f6;
  --color-accent-hover: #2563eb;
  --color-text:       #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-heading:    #ffffff;
  --font-main:        'Inter', 'Segoe UI', sans-serif;
  --radius:           12px;
  --max-width:        760px;
}

/* ─── RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-accent-hover); }

/* ─── HEADER / NAV ──────────────────────────────────────── */
.site-header {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-heading);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo img { height: 32px; width: auto; }

.site-logo span { color: var(--color-accent); }

.main-nav { display: flex; gap: 8px; }

.main-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all .2s;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--color-heading);
  background: var(--color-surface-2);
}

.nav-cta {
  background: var(--color-accent) !important;
  color: #fff !important;
  padding: 8px 18px !important;
}

.nav-cta:hover { background: var(--color-accent-hover) !important; }

/* ─── LAYOUT ────────────────────────────────────────────── */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .site-main { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* ─── BLOG INDEX ────────────────────────────────────────── */
.blog-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 0;
}

.blog-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--color-heading);
  line-height: 1.2;
}

.blog-header p {
  color: var(--color-text-muted);
  margin-top: 12px;
  font-size: 1.05rem;
}

.posts-grid {
  display: grid;
  gap: 24px;
}

/* ─── POST CARD ─────────────────────────────────────────── */
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: border-color .2s, transform .2s;
}

.post-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.post-card .post-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  display: flex;
  gap: 16px;
}

.post-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 10px;
  line-height: 1.35;
}

.post-card h2 a { color: inherit; }
.post-card h2 a:hover { color: var(--color-accent); }

.post-card .excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.65;
}

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

.read-more::after { content: '→'; transition: transform .2s; }
.read-more:hover::after { transform: translateX(4px); }

/* ─── SINGLE POST ───────────────────────────────────────── */
.post-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.post-header .post-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--color-heading);
  line-height: 1.2;
  margin-bottom: 16px;
}

/* ─── POST CONTENT ──────────────────────────────────────── */
.entry-content {
  max-width: var(--max-width);
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 2.5em 0 0.75em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent);
}

.entry-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-heading);
  margin: 2em 0 0.6em;
}

.entry-content p { margin-bottom: 1.25em; }

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.entry-content li { margin-bottom: 0.4em; }

.entry-content strong { color: var(--color-heading); font-weight: 600; }

.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 16px 24px;
  margin: 2em 0;
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.entry-content code {
  background: var(--color-surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-accent);
}

.entry-content pre {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.entry-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--color-text); font-size: 0.9rem; }
.widget ul li a:hover { color: var(--color-accent); }

/* CTA widget */
.widget-cta {
  background: linear-gradient(135deg, #1e3a5f 0%, #1a1a2e 100%);
  border-color: var(--color-accent);
  text-align: center;
}

.widget-cta p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: background .2s;
  width: 100%;
  text-align: center;
}

.btn-primary:hover { background: var(--color-accent-hover); }

/* ─── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 40px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-accent); }

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

.pagination a,
.pagination span {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.9rem;
}

.pagination .current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-inner { height: 56px; }
  .main-nav { display: none; }
  .post-card { padding: 20px; }
}
