/* ═══════════════════════════════════════════════════
   BLOG.CSS — AG Natural Gas
   Incluye: listado del blog + páginas de artículos
═══════════════════════════════════════════════════ */

/* ── HERO DEL LISTADO ── */
.page-hero--blog {
  background-image:
    linear-gradient(110deg, rgba(13,18,25,.88) 0%, rgba(13,18,25,.52) 65%, rgba(19,126,168,.18) 100%),
    url('../images/obras/Obra-1.jpg');
  background-size: cover;
  background-position: center;
}

/* ── BLOG LAYOUT ── */
.blog-section { background: var(--bg); padding: 96px 0; }
.blog-layout { display: grid; grid-template-columns: 1fr; gap: 60px; align-items: start; }

/* ── ARTICLES ── */
.articles { display: flex; flex-direction: column; gap: 0; }

/* Featured post */
.post-featured {
  display: grid; grid-template-columns: 1fr; gap: 0;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; margin-bottom: 24px;
  transition: box-shadow .3s, transform .3s;
  text-decoration: none; color: inherit;
}
.post-featured:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -10px rgba(0,0,0,.12); }
.post-featured-img { width: 100%; height: 260px; overflow: hidden; flex-shrink: 0; position: relative; }
.post-featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s; }
.post-featured:hover .post-featured-img img { transform: scale(1.04); }
.post-featured-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: #fff;
  background: var(--blue); padding: 5px 12px; border-radius: 3px;
}
.post-featured-body { padding: 32px 28px 28px; }
.post-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 14px;
}
.post-meta-dot { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; }
.post-featured-title {
  font-family: 'Archivo', sans-serif; font-weight: 800;
  font-size: clamp(20px, 3vw, 28px); line-height: 1.1;
  letter-spacing: -.02em; color: var(--ink); margin-bottom: 14px; transition: color .2s;
}
.post-featured:hover .post-featured-title { color: var(--blue); }
.post-featured-excerpt { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.post-read-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Archivo Narrow', sans-serif;
  font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue);
}
.post-read-more .arr { transition: transform .25s; display: inline-block; }
.post-featured:hover .post-read-more .arr { transform: translateX(5px); }

/* Posts list */
.posts-list { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  display: grid; grid-template-columns: 100px 1fr; gap: 16px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  text-decoration: none; color: inherit; transition: all .3s; align-items: stretch;
}
.post-card:hover { border-color: var(--blue); transform: translateX(4px); box-shadow: 0 8px 24px -6px rgba(0,0,0,.1); }
.post-card-img { width: 100px; flex-shrink: 0; overflow: hidden; position: relative; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.post-card:hover .post-card-img img { transform: scale(1.08); }
.post-card-tag {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 6px;
  background: var(--blue);
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: #fff; text-align: center;
}
.post-card-body { padding: 14px 16px 14px 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.post-card-cat {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--blue);
}
.post-card-title {
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 14px; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); transition: color .2s;
}
.post-card:hover .post-card-title { color: var(--blue); }
.post-card-link {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px; margin-top: 2px;
}
.post-card:hover .post-card-link { color: var(--blue); }

/* ── SIDEBAR COMPARTIDA ── */
.blog-sidebar,
.article-sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sidebar-widget-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-family: 'Archivo', sans-serif; font-weight: 800;
  font-size: 15px; letter-spacing: -.01em; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-widget-head::before { content: ''; width: 16px; height: 3px; background: var(--blue); border-radius: 2px; flex-shrink: 0; }
.sidebar-widget-body { padding: 16px 20px; }

.cat-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cat-list li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; border-radius: 6px; font-size: 14px; color: var(--ink-2);
  transition: all .2s; text-decoration: none;
}
.cat-list li a:hover { background: rgba(19,126,168,.07); color: var(--blue); }
.cat-count {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  background: var(--bg-2); color: var(--muted); padding: 2px 8px; border-radius: 100px;
}

.recent-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.recent-item a { display: flex; gap: 12px; text-decoration: none; align-items: center; }
.recent-item-img { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.recent-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-item-body { flex: 1; min-width: 0; }
.recent-item-title {
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 13px; line-height: 1.3; color: var(--ink); transition: color .2s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-item a:hover .recent-item-title { color: var(--blue); }
.recent-item-cat {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: var(--muted); margin-top: 3px;
}

.sidebar-cta { background: var(--blue); border-radius: 10px; padding: 28px 22px; text-align: center; }
.sidebar-cta h4 {
  font-family: 'Archivo', sans-serif; font-weight: 800;
  font-size: 17px; color: #fff; letter-spacing: -.01em; margin-bottom: 10px; line-height: 1.2;
}
.sidebar-cta p { font-size: 13.5px; color: rgba(255,255,255,.65); line-height: 1.6; margin-bottom: 20px; }
.sidebar-cta .cta-btn { width: 100%; justify-content: center; background: #fff; color: var(--blue) !important; }
.sidebar-cta .cta-btn:hover { background: var(--ink); color: #fff !important; }

/* ═══════════════════════════════════════════════════
   ARTICLE PAGE
═══════════════════════════════════════════════════ */

/* Hero del artículo */
.article-hero { background: var(--ink); position: relative; overflow: hidden; }
.article-hero-inner { max-width: 1480px; margin: 0 auto; padding: 60px var(--px) 48px; position: relative; z-index: 2; }
.article-breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin-bottom: 20px;
}
.article-breadcrumb a { color: rgba(255,255,255,.4); transition: color .2s; }
.article-breadcrumb a:hover { color: var(--blue); }
.article-breadcrumb span { color: rgba(255,255,255,.2); }
.article-cat {
  display: inline-block; background: var(--blue); color: #fff;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; padding: 5px 14px; border-radius: 3px; margin-bottom: 18px;
}
.article-hero h1 {
  font-family: 'Archivo', sans-serif; font-weight: 800;
  font-size: clamp(26px, 4.5vw, 52px); line-height: 1.05;
  letter-spacing: -.03em; color: #fff; max-width: 820px; margin-bottom: 20px;
}
.article-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; color: rgba(255,255,255,.45);
}
.article-author { font-weight: 600; color: rgba(255,255,255,.65); }
.article-dot { color: rgba(255,255,255,.25); }
.article-hero-img { width: 100%; max-height: 480px; overflow: hidden; position: relative; }
.article-hero-img::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(rgba(17,24,39,.5) 0%, transparent 40%);
}
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Layout artículo */
.article-layout { background: var(--bg); padding: 64px 0 96px; }
.article-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }

/* Contenido */
.article-content {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 48px 44px;
}
.article-lead {
  font-size: 18px; color: var(--ink-2); line-height: 1.75;
  margin-bottom: 36px; font-weight: 500;
  border-left: 3px solid var(--blue); padding-left: 20px;
}
.article-content h2 {
  font-family: 'Archivo', sans-serif; font-weight: 800;
  font-size: clamp(20px, 2.5vw, 28px); letter-spacing: -.02em;
  color: var(--ink); margin: 40px 0 16px; line-height: 1.15;
}
.article-content p { font-size: 16px; color: var(--muted); line-height: 1.8; margin-bottom: 18px; }
.article-content ul, .article-content ol { padding-left: 22px; margin-bottom: 20px; }
.article-content li { font-size: 15.5px; color: var(--muted); line-height: 1.75; margin-bottom: 8px; }
.article-content li strong { color: var(--ink-2); }

/* Callout */
.article-callout {
  display: flex; align-items: flex-start; gap: 16px;
  background: rgba(19,126,168,.06); border: 1px solid rgba(19,126,168,.2);
  border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0;
  padding: 18px 20px; margin: 28px 0;
  font-size: 15px; color: var(--ink-2); line-height: 1.65;
}
.article-callout-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--blue); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.article-callout-icon svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2; fill: none; }
.article-callout strong { color: var(--blue); }

/* Table */
.article-table-wrap { overflow-x: auto; margin: 24px 0; border-radius: 8px; border: 1px solid var(--line); }
.article-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.article-table th {
  background: var(--ink); color: #fff;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; padding: 12px 16px; text-align: left;
}
.article-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.article-table tr:last-child td { border-bottom: none; }
.article-table tr:nth-child(even) td { background: var(--bg); }

/* Article CTA */
.article-cta {
  background: var(--blue); border-radius: 10px;
  padding: 32px 28px; margin-top: 48px; text-align: center;
}
.article-cta h3 {
  font-family: 'Archivo', sans-serif; font-weight: 800;
  font-size: clamp(18px, 2.5vw, 24px); color: #fff;
  letter-spacing: -.02em; margin-bottom: 10px;
}
.article-cta p { font-size: 15px; color: rgba(255,255,255,.65); line-height: 1.6; margin-bottom: 24px; }
.article-cta .cta-btn { background: #fff; color: var(--blue) !important; display: inline-flex; }
.article-cta .cta-btn:hover { background: var(--ink); color: #fff !important; }

/* ── RESPONSIVE ── */
@media (min-width: 900px) {
  .blog-layout { grid-template-columns: 1fr 320px; }
  .post-featured { grid-template-columns: 230px 1fr; }
  .post-featured-img { height: auto; }
  .article-grid { grid-template-columns: 1fr 300px; }
  .article-hero-img { max-height: 520px; }
  .article-sidebar { position: sticky; top: 88px; }
}
@media (max-width: 640px) {
  .article-content { padding: 28px 22px; }
}
