/*
Theme Name: JSalinas AI Blog
Theme URI: https://jsalinasdigital.blog
Author: Jorge Salinas Licón
Author URI: https://jsalinasdigital.blog
Description: Tema profesional morado eléctrico para Strategic AI for Business — diseñado para directores y gerentes en LATAM.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: jsalinas-ai-blog
Tags: blog, custom-colors, custom-logo, featured-images, responsive-layout
*/

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: #f5f4f0;
  color: #1a1a1a;
  font-size: 16px;
  line-height: 1.6;
}

a { color: #7c3aed; text-decoration: none; }
a:hover { color: #a78bfa; }
img { max-width: 100%; height: auto; display: block; }

/* ── WRAPPER ── */
.site-wrapper { max-width: 960px; margin: 0 auto; }

/* ── NAVBAR ── */
.site-header {
  background: #0d0d12;
  border-bottom: 2px solid #7c3aed;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #7c3aed;
  flex-shrink: 0;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.nav-brand-name { color: #ede9f8; font-size: 15px; font-weight: 600; line-height: 1.2; }
.nav-brand-tagline { color: #6b5a8e; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }

.main-navigation { display: flex; align-items: center; gap: 24px; }
.main-navigation a { color: #9b87c4; font-size: 13px; text-decoration: none; transition: color 0.15s; }
.main-navigation a:hover,
.main-navigation .current-menu-item a { color: #ede9f8; }

.nav-cta-btn {
  background: #7c3aed;
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.nav-cta-btn:hover { background: #6d28d9 !important; color: #fff !important; }

/* ── HERO ── */
.site-hero {
  background: #0d0d12;
  padding: 4rem 2rem 3.5rem;
  border-bottom: 1px solid #1e1830;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.13) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: flex-start; gap: 3rem;
  position: relative;
}
.hero-text { flex: 1; }
.hero-photo-col {
  flex-shrink: 0; width: 160px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-photo-frame {
  width: 150px; height: 175px;
  border-radius: 12px; overflow: hidden;
  border: 2px solid #7c3aed;
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-photo-name { color: #ede9f8; font-size: 12px; font-weight: 600; text-align: center; }
.hero-photo-role { color: #6b5a8e; font-size: 10px; text-align: center; line-height: 1.5; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: 4px; padding: 5px 13px; margin-bottom: 1.4rem;
}
.hero-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; flex-shrink: 0; }
.hero-eyebrow-text { color: #a78bfa; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }

.hero-title { color: #ede9f8; font-size: 30px; font-weight: 700; line-height: 1.22; margin-bottom: 1rem; letter-spacing: -0.3px; }
.hero-title em { color: #a78bfa; font-style: normal; }

.hero-credentials { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem; }
.cred-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid #2a2040;
  border-radius: 20px; padding: 4px 10px;
  font-size: 10px; color: #9b87c4;
}

.hero-desc { color: #7a6a9e; font-size: 14px; line-height: 1.7; margin-bottom: 1.5rem; }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary {
  background: #7c3aed; color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 11px 24px; border-radius: 7px;
  border: none; cursor: pointer; text-decoration: none;
  display: inline-block; transition: background 0.15s;
}
.btn-primary:hover { background: #6d28d9; color: #fff; }
.btn-ghost {
  background: transparent; color: #9b87c4;
  font-size: 13px; padding: 11px 18px; border-radius: 7px;
  border: 1px solid #2a2040; cursor: pointer;
  text-decoration: none; display: inline-block; transition: border-color 0.15s;
}
.btn-ghost:hover { border-color: #7c3aed; color: #a78bfa; }

.hero-stats {
  display: flex; margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid #1e1830;
}
.hero-stat { flex: 1; padding-right: 2rem; }
.hero-stat + .hero-stat { padding-left: 2rem; border-left: 1px solid #1e1830; }
.stat-val { color: #a78bfa; font-size: 20px; font-weight: 700; margin-bottom: 3px; }
.stat-label { color: #4e3f6e; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── TOPIC STRIP ── */
.topic-strip {
  background: #f0ede8;
  border-bottom: 1px solid #ddd9d0;
  padding: 0.9rem 2rem;
  display: flex; gap: 6px; flex-wrap: wrap;
  max-width: 960px; margin: 0 auto;
}
.topic-chip {
  font-size: 11px; padding: 5px 13px; border-radius: 20px;
  border: 1px solid #ccc8bf; color: #666; cursor: pointer;
  background: #fff; text-decoration: none;
  transition: all 0.15s;
}
.topic-chip:hover,
.topic-chip.active { background: #f0ebff; color: #5b21b6; border-color: #c4b5fd; }

/* ── MAIN CONTENT AREA ── */
.site-main {
  max-width: 960px; margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

/* ── POSTS LOOP ── */
.posts-area {}
.section-heading {
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: #999; margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0ddd4;
}

/* FEATURED POST (primero) */
.post-card-featured {
  background: #0d0d12;
  border: 1px solid #2a2040;
  border-radius: 12px; overflow: hidden;
  margin-bottom: 1.5rem;
}
.post-card-featured .post-thumb {
  height: 220px; overflow: hidden; position: relative;
}
.post-card-featured .post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-featured .post-thumb-placeholder {
  height: 220px;
  background: linear-gradient(135deg, #1a1030 0%, #2a1060 60%, #7c3aed 100%);
  display: flex; align-items: center; justify-content: center;
}
.post-card-featured .post-thumb-placeholder svg { width: 64px; height: 64px; color: rgba(167,139,250,0.3); }
.feat-new-badge {
  position: absolute; top: 1rem; left: 1rem;
  background: #7c3aed; color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.post-card-featured .post-body { padding: 1.5rem 2rem; }
.post-card-featured .post-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0.75rem; }
.post-cat-tag {
  font-size: 10px; padding: 3px 9px; border-radius: 4px; font-weight: 600;
  background: #f0ebff; color: #5b21b6; border: 1px solid #c4b5fd;
  text-decoration: none;
}
.post-card-featured .post-title { font-size: 18px; font-weight: 700; color: #ede9f8; line-height: 1.35; margin-bottom: 0.75rem; }
.post-card-featured .post-title a { color: #ede9f8; text-decoration: none; }
.post-card-featured .post-title a:hover { color: #a78bfa; }
.post-card-featured .post-excerpt { color: #7a6a9e; font-size: 13px; line-height: 1.7; margin-bottom: 0; }
.post-card-featured .post-footer {
  padding: 1rem 2rem; border-top: 1px solid #1e1830;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.post-date { font-size: 11px; color: #4e3f6e; }
.post-read-more { font-size: 12px; color: #a78bfa; font-weight: 600; text-decoration: none; }
.post-read-more:hover { color: #7c3aed; }

/* REGULAR POST CARDS */
.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 2rem; }
.post-card {
  background: #fff;
  border: 1px solid #e0ddd4;
  border-radius: 12px; padding: 1.25rem;
  display: flex; flex-direction: column;
  transition: border-color 0.15s;
}
.post-card:hover { border-color: #a78bfa; }
.post-card .post-cat { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: #7c3aed; margin-bottom: 0.6rem; text-decoration: none; }
.post-card .post-title { font-size: 14px; font-weight: 700; color: #1a1a1a; line-height: 1.4; margin-bottom: 0.5rem; flex: 1; }
.post-card .post-title a { color: #1a1a1a; text-decoration: none; }
.post-card .post-title a:hover { color: #7c3aed; }
.post-card .post-excerpt { font-size: 12px; color: #666; line-height: 1.6; margin-bottom: 0.9rem; }
.post-card .post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.post-card .post-date { font-size: 11px; color: #999; }
.post-card .post-read-more { font-size: 11px; color: #7c3aed; font-weight: 600; text-decoration: none; }

/* PAGINACIÓN */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e0ddd4;
  color: #666;
  text-decoration: none;
  background: #fff;
  line-height: 1;
  flex-shrink: 0;
}
.pagination .page-numbers.dots {
  width: auto;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: #999;
}
.pagination .page-numbers.next,
.pagination .page-numbers.prev {
  width: auto;
  padding: 0 14px;
  white-space: nowrap;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

/* ── SIDEBAR ── */
.site-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

/* About card */
.sidebar-about {
  background: #0d0d12;
  border: 1px solid #2a2040;
  border-radius: 12px; padding: 1.5rem;
}
.sidebar-about-header { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.sidebar-photo {
  width: 54px; height: 54px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid #7c3aed;
}
.sidebar-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.sidebar-name { color: #ede9f8; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.sidebar-role { color: #6b5a8e; font-size: 11px; line-height: 1.4; }
.sidebar-about p { color: #7a6a9e; font-size: 12px; line-height: 1.65; margin-bottom: 1rem; }
.sidebar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sidebar-btn {
  background: rgba(124,58,237,0.14);
  border: 1px solid rgba(124,58,237,0.3);
  color: #a78bfa; font-size: 11px;
  padding: 6px 12px; border-radius: 6px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
  transition: background 0.15s;
}
.sidebar-btn:hover { background: rgba(124,58,237,0.25); color: #c4b5fd; }

/* Newsletter card */
.sidebar-newsletter {
  background: #fff;
  border: 1px solid #e0ddd4;
  border-radius: 12px; padding: 1.5rem;
}
.nl-eyebrow {
  display: inline-block;
  background: #f0ebff; color: #5b21b6;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 3px;
  margin-bottom: 0.75rem; border: 1px solid #c4b5fd;
}
.sidebar-newsletter h3 { font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 0.4rem; }
.sidebar-newsletter p { font-size: 12px; color: #666; line-height: 1.65; margin-bottom: 1rem; }
.nl-form input[type="email"] {
  width: 100%; padding: 9px 12px; font-size: 13px;
  border: 1px solid #ccc8bf; border-radius: 7px;
  margin-bottom: 8px; background: #f5f4f0; color: #1a1a1a;
}
.nl-form button {
  width: 100%; background: #7c3aed; color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 10px; border-radius: 7px; border: none; cursor: pointer;
  transition: background 0.15s;
}
.nl-form button:hover { background: #6d28d9; }

/* Categorías en sidebar */
.sidebar-widget {
  background: #fff; border: 1px solid #e0ddd4;
  border-radius: 12px; padding: 1.25rem;
}
.sidebar-widget-title {
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #999; margin-bottom: 0.9rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid #e0ddd4;
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { padding: 5px 0; border-bottom: 1px solid #f0ede8; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { font-size: 13px; color: #444; text-decoration: none; display: flex; justify-content: space-between; align-items: center; }
.sidebar-widget ul li a:hover { color: #7c3aed; }
.sidebar-widget ul li .cat-count { background: #f0ebff; color: #5b21b6; font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600; }

/* ── SINGLE POST ── */
.single-post-wrap { max-width: 720px; margin: 2rem auto; padding: 0 2rem; }
.single-post-header { margin-bottom: 2rem; }
.single-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem; }
.single-post-title { font-size: 28px; font-weight: 700; color: #1a1a1a; line-height: 1.25; margin-bottom: 1rem; }
.single-post-meta { font-size: 12px; color: #999; margin-bottom: 1.5rem; }
.single-post-thumb { border-radius: 12px; overflow: hidden; margin-bottom: 2rem; }
.single-post-thumb img { width: 100%; }
.post-content { font-size: 16px; line-height: 1.75; color: #2a2a2a; }
.post-content h2 { font-size: 22px; font-weight: 700; color: #1a1a1a; margin: 2rem 0 1rem; }
.post-content h3 { font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 1.5rem 0 0.75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content a { color: #7c3aed; }
.post-content blockquote {
  border-left: 3px solid #7c3aed; padding: 1rem 1.5rem;
  background: #f0ebff; border-radius: 0 8px 8px 0;
  font-style: italic; color: #5b21b6; margin: 1.5rem 0;
}
.post-content img { border-radius: 8px; margin: 1.5rem 0; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.4rem; }

/* Post nav */
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 3rem 0; }
.nav-prev, .nav-next { background: #fff; border: 1px solid #e0ddd4; border-radius: 10px; padding: 1rem; }
.nav-next { text-align: right; }
.nav-label { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.nav-title { font-size: 13px; font-weight: 600; color: #7c3aed; }

/* ── FOOTER ── */
.site-footer {
  background: #0d0d12;
  border-top: 2px solid #7c3aed;
  margin-top: 3rem;
}
.footer-inner { max-width: 960px; margin: 0 auto; padding: 2rem; }
.footer-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  gap: 1rem; margin-bottom: 1.5rem;
}
.footer-brand-name { color: #ede9f8; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.footer-brand-sub { color: #4e3f6e; font-size: 11px; }
.footer-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer-links a { color: #6b5a8e; font-size: 12px; text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: #a78bfa; }
.footer-divider { height: 1px; background: #1e1830; margin-bottom: 1.2rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-copy { color: #4e3f6e; font-size: 11px; }
.footer-li a { color: #6b5a8e; font-size: 11px; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.footer-li a:hover { color: #a78bfa; }

/* Botón regresar a home */
.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #7c3aed;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: 2px solid #7c3aed;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-back-home:hover {
  background: #7c3aed;
  color: #fff;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-inner { flex-direction: column-reverse; gap: 1.5rem; }
  .hero-photo-col { width: 100%; flex-direction: row; align-items: center; gap: 1rem; }
  .hero-photo-frame { width: 80px; height: 95px; }
  .hero-title { font-size: 24px; }
  .site-main { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .hero-stat { min-width: 40%; }
  .hero-stat + .hero-stat { border-left: none; padding-left: 0; }
}
