/* ===== Miranda Proyectos — Blog (estilos compartidos) ===== */
:root {
  --black: #141414;
  --gray: #737373;
  --gray-light: #f5f5f5;
  --blue: hsl(197, 95%, 77%);
  --white: #ffffff;
  --max: 1200px;
  --measure: 760px;
  --header-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400; color: var(--black); background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 100; background: var(--white);
  border-bottom: 1px solid #e5e5e5; height: var(--header-h);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 38px; width: auto; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { font-size: 14px; font-weight: 400; color: var(--black); transition: opacity .2s; }
nav a:hover { opacity: .6; }
.btn-nav {
  background: var(--blue); color: var(--black) !important; font-weight: 500;
  font-size: 14px; padding: 8px 20px; border-radius: 999px; transition: opacity .2s;
}
.btn-nav:hover { opacity: .85 !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--black); border-radius: 2px; }

/* ── CONTENEDOR / SECCIONES ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 24px; }
.section-gray { background: var(--gray-light); }
.label { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); margin-bottom: 14px; }
.title { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 300; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 16px; }
.title strong { font-weight: 700; }

/* ── BREADCRUMB ── */
.breadcrumb { font-size: 13px; color: var(--gray); padding: 24px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--gray); transition: color .2s; }
.breadcrumb a:hover { color: var(--black); }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 8px; color: #bbb; }
.breadcrumb [aria-current="page"] { color: var(--black); }

/* ── HERO DE ARTÍCULO ── */
.post-hero { padding: 8px 0 40px; }
.post-hero .meta { font-size: 13px; color: var(--gray); margin-bottom: 16px; display: flex; gap: 14px; flex-wrap: wrap; }
.post-hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; max-width: 18ch; margin-bottom: 0; }
.post-figure { margin-top: 32px; border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; background: #e0e0e0; }
.post-figure img { width: 100%; height: 100%; object-fit: cover; }
.post-figure figcaption { font-size: 12px; color: var(--gray); padding: 10px 4px 0; }

/* ── CUERPO DEL ARTÍCULO ── */
.article { max-width: var(--measure); margin: 0 auto; padding: 48px 24px 16px; }
.article > p { font-size: 1.0625rem; color: #2b2b2b; line-height: 1.85; margin-bottom: 22px; }
.article h2 { font-size: clamp(1.4rem, 2.6vw, 1.875rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 48px 0 16px; }
.article h3 { font-size: 1.1875rem; font-weight: 600; margin: 32px 0 12px; }
.article ul, .article ol { margin: 0 0 22px 1.25em; }
.article li { font-size: 1.0625rem; color: #2b2b2b; line-height: 1.8; margin-bottom: 8px; }
.article a:not(.btn-cta):not(.btn-secondary) { color: #0b7fb0; text-decoration: underline; text-underline-offset: 2px; }
.article strong { font-weight: 600; color: var(--black); }
.article blockquote {
  border-left: 3px solid var(--blue); padding: 4px 0 4px 20px; margin: 28px 0;
  color: var(--gray); font-size: 1.0625rem; line-height: 1.8;
}
.article table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .9375rem; }
.article th, .article td { border: 1px solid #e5e5e5; padding: 12px 14px; text-align: left; vertical-align: top; }
.article th { background: var(--gray-light); font-weight: 600; }
.tip { background: var(--gray-light); border-radius: 12px; padding: 20px 24px; margin: 28px 0; font-size: 1rem; color: #2b2b2b; line-height: 1.75; }
.tip strong { color: var(--black); }

/* ── FAQ (acordeón) ── */
.faq { max-width: var(--measure); margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 2px; margin-top: 24px; }
.faq details { background: var(--white); border: 1px solid #e5e5e5; border-radius: 10px; overflow: hidden; }
.faq summary { padding: 18px 22px; cursor: pointer; font-size: 1rem; font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 16px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.375rem; font-weight: 300; color: var(--gray); flex-shrink: 0; }
.faq details[open] summary::after { content: '−'; }
.faq-body { padding: 0 22px 18px; font-size: .9375rem; color: var(--gray); line-height: 1.8; }

/* ── AUTHOR BOX ── */
.author-box {
  max-width: var(--measure); margin: 40px auto 0; padding: 22px 24px;
  background: var(--gray-light); border-radius: 14px; display: flex; align-items: center; gap: 16px;
}
.author-box .ab-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--black); flex-shrink: 0;
}
.author-box .ab-name { font-size: .9375rem; font-weight: 600; }
.author-box .ab-meta { font-size: .8125rem; color: var(--gray); margin-top: 2px; }

/* ── CTA ── */
.post-cta { max-width: var(--measure); margin: 48px auto 0; background: var(--black); color: var(--white); border-radius: 18px; padding: 40px 32px; text-align: center; }
.post-cta h2 { font-size: clamp(1.375rem, 2.6vw, 1.875rem); font-weight: 300; letter-spacing: -.02em; margin-bottom: 10px; }
.post-cta h2 strong { font-weight: 700; }
.post-cta p { color: rgba(255,255,255,.6); font-size: .9375rem; margin-bottom: 28px; }
.cta-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: var(--black); font-weight: 600; font-size: 15px; padding: 14px 30px; border-radius: 999px; transition: opacity .2s, transform .2s; }
.btn-cta:hover { opacity: .9; transform: translateY(-1px); }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.2); color: var(--white); font-size: 15px; font-weight: 500; padding: 14px 30px; border-radius: 999px; transition: border-color .2s; }
.btn-secondary:hover { border-color: rgba(255,255,255,.5); }

/* ── RELACIONADOS ── */
.related { max-width: var(--measure); margin: 56px auto 0; }
.related h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card { border: 1px solid #e5e5e5; border-radius: 12px; padding: 22px; transition: border-color .2s, box-shadow .2s; display: block; }
.related-card:hover { border-color: var(--blue); box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.related-card .tag { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); margin-bottom: 8px; }
.related-card h3 { font-size: .9375rem; font-weight: 500; color: var(--black); margin-bottom: 10px; }
.related-card .arrow { font-size: .875rem; color: var(--blue); font-weight: 500; }

/* ── ÍNDICE DEL BLOG ── */
.blog-head { padding: 56px 0 8px; }
.blog-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: 14px; }
.blog-head p { font-size: 1.0625rem; color: var(--gray); line-height: 1.75; max-width: 640px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 40px 0 8px; }
.post-card { border: 1px solid #e5e5e5; border-radius: 16px; overflow: hidden; transition: border-color .2s, box-shadow .2s; display: flex; flex-direction: column; }
.post-card:hover { border-color: var(--blue); box-shadow: 0 6px 24px rgba(0,0,0,.07); }
.post-card .thumb { height: 200px; background: #e0e0e0; overflow: hidden; flex-shrink: 0; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card .tag { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); margin-bottom: 10px; }
.post-card h2 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; margin-bottom: 10px; letter-spacing: -.01em; }
.post-card p { font-size: .9375rem; color: var(--gray); line-height: 1.7; margin-bottom: 18px; flex: 1; }
.post-card .arrow { font-size: .875rem; color: var(--blue); font-weight: 500; }

/* ── FOOTER ── */
footer { background: var(--gray-light); padding: 64px 24px 0; margin-top: 80px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-logo img { height: 38px; width: auto; margin-bottom: 16px; }
.footer-slogan { font-size: .875rem; color: var(--gray); line-height: 1.7; max-width: 220px; }
.footer-col h4 { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--black); margin-bottom: 20px; }
.footer-links, .footer-contact { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a { font-size: .9375rem; color: var(--blue); transition: opacity .2s; }
.footer-links a:hover, .footer-contact a:hover { opacity: .7; }
.footer-contact .addr { font-size: .9375rem; color: var(--gray); }
.footer-bottom { border-top: 1px solid #e0e0e0; padding: 20px 0; text-align: center; font-size: .8125rem; color: var(--gray); }
.footer-bottom a { color: var(--blue); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .blog-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  nav { display: none; }
  nav.open { display: flex; flex-direction: column; position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--white); padding: 24px; border-bottom: 1px solid #e5e5e5; gap: 20px; z-index: 99; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 20px; }
}
