/*
Theme Name: Scalab Blog
Theme URI: https://scalab.pe
Author: Ricardo Guerrero
Author URI: https://scalab.pe
Description: Tema minimalista para el blog de Scalab. Consultoría de Growth para Startups.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: scalab-blog
*/

/* ========== VARIABLES & RESET ========== */
:root {
  --primary: #98b9b3;
  --secondary: #607791;
  --dark: #000000;
  --light: #ffffff;
  --gray-50: #f8f8f7;
  --gray-100: #ececea;
  --gray-200: #d4d4d4;
  --gray-400: #8a8a8a;
  --gray-500: #6b6b6b;
  --gray-600: #555555;
  --gray-800: #1a1a1a;
  --gray-900: #0d0d0d;
  --font: 'Poppins', Arial, sans-serif;
  --max-w: 800px;
  --max-w-wide: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }

/* ========== NAVIGATION ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 20px 0; transition: all 0.4s ease;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(152,185,179,0.1);
}
.nav .container { display: flex; justify-content: space-between; align-items: center; }

.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo svg { height: 32px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--gray-400); letter-spacing: 0.3px; }
.nav-links a:hover { color: var(--light); }
.nav-links a.active { color: var(--light); }

.nav-cta {
  background: var(--secondary); color: var(--light) !important;
  padding: 10px 24px; border-radius: 6px;
  font-weight: 600; font-size: 13px !important; letter-spacing: 0.5px;
}
.nav-cta:hover { background: var(--primary); color: var(--dark) !important; }

.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--light); margin: 6px 0; }
.nav-mobile { display: none; }

/* ========== BLOG HERO ========== */
.blog-hero {
  padding: 140px 0 60px;
  background: var(--dark);
  color: var(--light);
}

.blog-hero h1 {
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.blog-hero h1 .accent { color: var(--primary); }

.blog-hero p {
  font-size: 17px;
  color: var(--gray-400);
  max-width: 520px;
  line-height: 1.7;
}

/* ========== POST LISTING ========== */
.blog-listing {
  padding: 80px 0;
  background: var(--gray-50);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.post-card {
  background: var(--light);
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.post-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--gray-100);
}

.post-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-image-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: var(--gray-200);
  fill: none;
  stroke-width: 1;
}

.post-card-body { padding: 28px 28px 32px; }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.post-card-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(152,185,179,0.1);
  padding: 4px 10px;
  border-radius: 4px;
}

.post-card-date {
  font-size: 12px;
  color: var(--gray-400);
}

.post-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--dark);
}

.post-card-title a:hover { color: var(--secondary); }

.post-card-excerpt {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card-link:hover { color: var(--primary); gap: 10px; }
.post-card-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ========== SINGLE POST ========== */
.single-hero {
  padding: 140px 0 48px;
  background: var(--dark);
  color: var(--light);
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.single-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(152,185,179,0.1);
  padding: 5px 12px;
  border-radius: 4px;
}

.single-date {
  font-size: 13px;
  color: var(--gray-400);
}

.single-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  max-width: 800px;
}

.single-content {
  padding: 64px 0 80px;
  background: var(--light);
}

.single-content .container-narrow {
  font-size: 17px;
  line-height: 1.85;
  color: var(--gray-600);
}

.single-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin: 48px 0 20px;
}

.single-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
  margin: 40px 0 16px;
}

.single-content p { margin-bottom: 24px; }

.single-content ul, .single-content ol {
  margin: 20px 0 28px 24px;
}

.single-content li {
  margin-bottom: 10px;
}

.single-content blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--primary);
  background: var(--gray-50);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--gray-500);
}

.single-content img {
  border-radius: 12px;
  margin: 32px 0;
}

.single-content a {
  color: var(--secondary);
  font-weight: 500;
  border-bottom: 1px solid rgba(96,119,145,0.3);
}
.single-content a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.single-content code {
  background: var(--gray-50);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.single-content pre {
  background: var(--gray-900);
  color: var(--gray-200);
  padding: 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 28px 0;
}

.single-content pre code {
  background: none;
  padding: 0;
}

/* Author box */
.author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 32px;
  background: var(--gray-50);
  border-radius: 16px;
  margin-top: 64px;
  border: 1px solid var(--gray-100);
}

.author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-box-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.author-box-bio {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* Post navigation */
.post-nav {
  padding: 48px 0;
  border-top: 1px solid var(--gray-100);
}

.post-nav-link {
  font-size: 14px;
  color: var(--secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-nav-link:hover { color: var(--primary); }

/* ========== CTA SECTION ========== */
.blog-cta {
  padding: 0;
  background: var(--secondary);
}
.blog-cta-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 56px 0;
}
.blog-cta-text h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--light);
}
.blog-cta-text p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
}
.blog-cta .btn-primary {
  background: var(--light);
  color: var(--secondary);
}
.blog-cta .btn-primary:hover {
  background: var(--primary);
  color: var(--dark);
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 8px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.3s ease;
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
}

.pagination a, .pagination span {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.pagination a {
  color: var(--gray-500);
  border: 1px solid var(--gray-100);
}
.pagination a:hover {
  border-color: var(--primary);
  color: var(--dark);
}

.pagination .current {
  background: var(--secondary);
  color: var(--light);
}

/* ========== FOOTER ========== */
.footer {
  padding: 60px 0 40px;
  background: var(--dark);
  color: var(--light);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}

.footer-logo-row { margin-bottom: 12px; }
.footer-logo-row svg { height: 28px; width: auto; }
.footer-tagline { font-size: 13px; color: var(--gray-600); max-width: 280px; line-height: 1.5; }

.footer-links-group { display: flex; gap: 64px; }
.footer-col-title {
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 20px;
}
.footer-col a { display: block; font-size: 14px; color: var(--gray-600); margin-bottom: 12px; }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-copy { font-size: 12px; color: var(--gray-600); }

.footer-socials { display: flex; gap: 16px; }
.footer-social {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08); display: flex;
  align-items: center; justify-content: center; transition: all 0.3s ease;
}
.footer-social:hover { border-color: var(--primary); background: rgba(152,185,179,0.06); }
.footer-social svg { width: 16px; height: 16px; fill: var(--gray-400); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .container, .container-narrow { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-mobile {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.97); z-index: 1001;
    flex-direction: column; align-items: center;
    justify-content: center; gap: 32px;
  }
  .nav-mobile.active { display: flex; }
  .nav-mobile a { font-size: 20px; font-weight: 600; color: var(--light); }
  .nav-mobile-close {
    position: absolute; top: 24px; right: 24px;
    background: none; border: none; font-size: 32px; color: var(--light); cursor: pointer;
  }
  .posts-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 120px 0 48px; }
  .blog-cta-box { flex-direction: column; text-align: center; gap: 24px; padding: 40px 20px; }
  .author-box { flex-direction: column; text-align: center; }
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-links-group { gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

@media (max-width: 480px) {
  .footer-links-group { flex-direction: column; gap: 32px; }
}
