/* ========================================
   MultiApp Blog — Estilos
   Coherente con el diseño de multiapp.es
   ======================================== */

/* Variables (idénticas a multiapp.es) */
:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --secondary: #06b6d4;
  --secondary-light: #22d3ee;
  --accent: #10b981;
  --accent-light: #34d399;
  --warning: #f59e0b;
  --dark: #0f172a;
  --text: #334155;
  --text-light: #64748b;
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-soft: linear-gradient(135deg, #e0e7ff 0%, #cffafe 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ========================================
   HEADER (idéntico a multiapp.es)
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
  padding: 10px 20px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: 0.3s;
}

/* ========================================
   BLOG INDEX
   ======================================== */
.blog-hero {
  background: var(--gradient);
  padding: 80px 24px 60px;
  text-align: center;
  color: var(--white);
}

.blog-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.blog-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-card-body {
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.blog-card-tag {
  background: var(--gradient-soft);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 8px;
}

.blog-card h2 a {
  color: var(--dark);
}

.blog-card h2 a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

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

.blog-card-link:hover { gap: 10px; }

/* ========================================
   ARTICLE PAGE
   ======================================== */
.article-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.85) 0%, transparent 100%);
  padding: 60px 24px 40px;
  color: var(--white);
}

.article-hero-overlay .breadcrumb {
  font-size: 13px;
  margin-bottom: 16px;
  opacity: 0.8;
}

.article-hero-overlay .breadcrumb a {
  color: var(--white);
  opacity: 0.8;
}

.article-hero-overlay .breadcrumb a:hover { opacity: 1; }

.article-hero-overlay h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 800px;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.85;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Article content styles */
.article-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  margin-top: 48px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 36px;
  margin-bottom: 16px;
}

.article-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
  line-height: 1.8;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  color: var(--dark);
  font-weight: 600;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--gradient-soft);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
  font-style: italic;
  color: var(--dark);
}

.article-content .article-image {
  margin: 36px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-content .article-image img {
  width: 100%;
  height: auto;
}

.article-content .article-image figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-light);
  background: var(--bg-alt);
  text-align: center;
}

/* Info box / callout */
.info-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.info-box.warning {
  border-left: 4px solid var(--warning);
  background: #fffbeb;
}

.info-box.success {
  border-left: 4px solid var(--accent);
  background: #ecfdf5;
}

.info-box.primary {
  border-left: 4px solid var(--primary);
  background: #eef2ff;
}

.info-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.95rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-content table thead {
  background: var(--dark);
  color: var(--white);
}

.article-content table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.article-content table tbody tr:nth-child(even) {
  background: var(--bg-alt);
}

.article-content table tbody tr:hover {
  background: var(--gradient-soft);
}

/* CTA Box */
.article-cta {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: var(--white);
  margin: 48px 0;
}

.article-cta h3 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.article-cta p {
  opacity: 0.9;
  margin-bottom: 24px;
  font-size: 1rem;
}

.article-cta .btn-white {
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-cta .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  color: var(--primary);
}

/* Author box */
.author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 48px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 24px;
  flex-shrink: 0;
}

.author-info h4 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.author-info p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

/* Related articles */
.related-articles {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 24px;
}

/* ========================================
   FOOTER (idéntico a multiapp.es)
   ======================================== */
.site-footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 64px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 16px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: #94a3b8;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .menu-toggle { display: block; }

  .blog-hero h1 { font-size: 1.8rem; }
  .blog-grid { grid-template-columns: 1fr; }

  .article-hero { height: 300px; }
  .article-hero-overlay h1 { font-size: 1.5rem; }
  .article-container { padding: 32px 16px 60px; }
  .article-content h2 { font-size: 1.3rem; margin-top: 36px; }
  .article-content p { font-size: 1rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  .author-box { flex-direction: column; text-align: center; }

  .article-cta { padding: 28px 20px; }
  .article-cta h3 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .blog-hero { padding: 60px 16px 40px; }
  .blog-hero h1 { font-size: 1.5rem; }
  .article-hero { height: 240px; }
  .article-hero-overlay h1 { font-size: 1.3rem; }
}
