/* ═══════════════════════════════════════════════════════════════
   BIMARG BLOG — stylesheet
   Background: #080808 | Accent: #00BFFF
   Fonts: Syne (headings) + DM Sans (body)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:       #080808;
  --bg2:      #0f0f0f;
  --bg3:      #141414;
  --surface:  #1a1a1a;
  --border:   rgba(255,255,255,0.07);
  --cyan:     #00BFFF;
  --cyan-dim: rgba(0,191,255,0.15);
  --text:     #e8e8e8;
  --text-dim: #888;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius:   12px;
  --max-w:    1200px;
  --max-post: 780px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ── Cursor ──────────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.2s, height 0.2s, opacity 0.2s;
  z-index: 9999;
  opacity: 0.6;
}
.cursor-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
.cursor.hover { width: 48px; height: 48px; opacity: 0.9; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.08em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--cyan-dim);
  border: 1px solid var(--cyan);
  color: var(--cyan) !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: rgba(0,191,255,0.25) !important; }

/* ── Reveal animation ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── em gradient (marca BIMARG) ──────────────────────────── */
em {
  font-style: normal;
  background: linear-gradient(90deg, var(--cyan), #0080cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════
   BLOG INDEX
   ═══════════════════════════════════════════════════════════ */

.blog-main { padding-top: 64px; }

/* Header */
.blog-header {
  padding: 120px 40px 80px;
  border-bottom: 1px solid var(--border);
}
.blog-header-inner { max-width: var(--max-w); margin: 0 auto; }

.blog-overline {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
}
.blog-title {
  font-family: var(--font-head);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 24px;
}
.blog-subtitle {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 480px;
  line-height: 1.65;
}

/* Filters */
.blog-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 40px 120px;
}
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 52px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 18px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: none;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.post-card:hover {
  border-color: rgba(0,191,255,0.3);
  transform: translateY(-4px);
}
.post-card-link { display: block; text-decoration: none; color: inherit; }

.post-card-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface);
}
.post-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-img img { transform: scale(1.04); }

.post-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f1a22 0%, #061218 100%);
}
.post-card-placeholder span {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--cyan);
  opacity: 0.5;
  text-transform: uppercase;
}

.post-card-cat {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(8,8,8,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
}

.post-card-body { padding: 24px; }
.post-card-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
}
.post-card-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #555;
}

.no-posts {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-dim);
  padding: 80px 0;
  font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════
   POST INDIVIDUAL
   ═══════════════════════════════════════════════════════════ */

.post-main { padding-top: 64px; }
.post-article { max-width: var(--max-post); margin: 0 auto; padding: 80px 40px 120px; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 28px;
  transition: color 0.2s;
}
.post-back:hover { color: var(--cyan); }

.post-cat {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.post-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
}

.post-description {
  font-size: 19px;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 28px;
  border-left: 2px solid var(--cyan);
  padding-left: 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #555;
  margin-bottom: 48px;
}
.post-sep { color: #333; }

.post-cover {
  margin-bottom: 56px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.post-cover img { width: 100%; display: block; }

/* Contenido del post (generado de Markdown) */
.post-body { line-height: 1.85; }

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-head);
  color: #fff;
  margin: 2.2em 0 0.7em;
  line-height: 1.2;
}
.post-body h2 { font-size: 28px; }
.post-body h3 { font-size: 22px; }
.post-body h4 { font-size: 18px; }

.post-body p { margin-bottom: 1.4em; color: var(--text); }

.post-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0,191,255,0.3);
}
.post-body a:hover { text-decoration-color: var(--cyan); }

.post-body ul,
.post-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.4em;
}
.post-body li { margin-bottom: 0.5em; }

.post-body blockquote {
  border-left: 3px solid var(--cyan);
  padding: 16px 24px;
  margin: 2em 0;
  background: var(--bg2);
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
  font-style: italic;
}

.post-body code {
  background: var(--surface);
  color: var(--cyan);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}
.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 1.6em;
}
.post-body pre code {
  background: none;
  padding: 0;
  color: #ccc;
}

.post-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 2em 0;
  display: block;
  border: 1px solid var(--border);
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 14px;
}
.post-body th,
.post-body td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}
.post-body th {
  background: var(--surface);
  color: var(--cyan);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post-body tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3em 0;
}

/* CTA al final del post */
.post-footer {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.post-footer-cta {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  text-align: center;
}
.post-footer-cta p {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.btn-cta {
  display: inline-block;
  background: var(--cyan);
  color: #000;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-cta:hover { opacity: 0.88; transform: translateY(-2px); }

.post-back-bottom {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.post-back-bottom:hover { color: var(--cyan); }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}
.footer-copy { font-size: 13px; color: #444; }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 13px;
  color: #444;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }

/* ── Posts relacionados ──────────────────────────────────── */
.related-posts {
  max-width: var(--max-post);
  margin: 0 auto 80px;
  padding: 0 40px;
}
.related-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 28px;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.related-card {
  display: block;
  text-decoration: none;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.related-card:hover {
  border-color: rgba(0,191,255,0.3);
  transform: translateY(-3px);
}
.related-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface);
}
.related-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.related-card:hover .related-card-img img { transform: scale(1.04); }
.related-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1a22 0%, #061218 100%);
}
.related-card-placeholder span {
  font-size: 11px; letter-spacing: 0.15em;
  color: var(--cyan); opacity: 0.5; text-transform: uppercase;
}
.related-card-body { padding: 16px; }
.related-card-cat {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); display: block; margin-bottom: 8px;
}
.related-card-title {
  font-family: var(--font-head); font-size: 15px; font-weight: 700;
  color: #fff; line-height: 1.3; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.related-card-time { font-size: 11px; color: #555; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { gap: 20px; }

  .blog-header { padding: 100px 20px 60px; }
  .blog-content { padding: 40px 20px 80px; }
  .blog-title { font-size: 42px; }

  .posts-grid { grid-template-columns: 1fr; }

  .post-article { padding: 60px 20px 80px; }
  .post-title { font-size: 32px; }
  .post-footer-cta { padding: 28px 24px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
}
