/*
Theme Name: Molino San Miguel Blog
Theme URI: https://molinoyfundicionsm.com
Author: Molino y Fundicion San Miguel
Description: Tema de blog para Molino y Fundicion San Miguel. Estilo industrial que hereda la identidad del sitio principal en Astro: negro carbon, fondo humo y acento oxido. Tipografia Inter.
Version: 1.0.0
License: Proprietary
Text Domain: molino-blog
*/

:root {
  --primary: #1a1a1a;
  --secondary: #2d2d2d;
  --smoke: #f7f7f7;
  --white: #ffffff;
  --steel: #6b7280;
  --steel-light: #9ca3af;
  --ash: #e2e2e2;
  --accent: #b85520;
  --accent-dark: #9a4518;
  --accent-light: #e07840;
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--smoke);
  color: var(--primary);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Kicker: etiqueta industrial en mayusculas */
.kicker {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent);
}

/* HEADER */
.site-header { background: var(--primary); color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.brand .txt b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.brand .txt span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .18em; color: var(--steel-light); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; font-size: 14px; font-weight: 500; color: #d6d6d6;
  border-radius: 4px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--white); background: rgba(255,255,255,.07); }
.nav a.current { color: var(--white); }
.nav a.current::after { content: ""; display: block; height: 2px; background: var(--accent); margin-top: 4px; border-radius: 2px; }
.nav a.cta { background: var(--accent); color: var(--white); font-weight: 600; }
.nav a.cta:hover { background: var(--accent-dark); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 4px; padding: 8px 10px; cursor: pointer; }

/* PAGE HEAD */
.page-head { border-bottom: 1px solid var(--ash); background: var(--white); }
.page-head .wrap { padding: 56px 24px 44px; }
.page-head h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 12px 0 0; }
.page-head p { color: var(--steel); margin-top: 12px; max-width: 60ch; }

/* LISTADO */
.list { padding: 48px 0 72px; }
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--ash); border-left: 3px solid var(--accent);
  padding: 26px 26px 24px; transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(26,26,26,.09); }
.card .meta { font-size: 12.5px; color: var(--steel-light); text-transform: uppercase; letter-spacing: .06em; }
.card h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin: 10px 0 10px; }
.card h2 a:hover { color: var(--accent-dark); }
.card p { color: var(--steel); font-size: 15.5px; margin-bottom: 18px; }
.card .more { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--accent); }
.card .more span { transition: margin-left .15s; }
.card:hover .more span { margin-left: 5px; }

/* ARTICULO */
.article { padding: 48px 0 72px; }
.article .container { max-width: 760px; margin: 0 auto; }
.article .meta { font-size: 13px; color: var(--steel-light); text-transform: uppercase; letter-spacing: .06em; }
.article h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 12px 0 24px; }
.article .content { font-size: 17.5px; line-height: 1.75; color: #262626; }
.article .content > * + * { margin-top: 20px; }
.article .content h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin-top: 40px; }
.article .content h3 { font-size: 21px; font-weight: 700; margin-top: 32px; }
.article .content a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.article .content img { border: 1px solid var(--ash); }
.article .content blockquote { border-left: 3px solid var(--accent); padding: 6px 0 6px 20px; color: var(--steel); font-style: italic; }
.article .content ul, .article .content ol { padding-left: 22px; }
.article .content li + li { margin-top: 6px; }

.backrow { margin-bottom: 28px; }
.backrow a { font-size: 14px; font-weight: 600; color: var(--steel); }
.backrow a:hover { color: var(--accent-dark); }

.postnav { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--ash); display: flex; justify-content: space-between; gap: 16px; font-size: 14px; font-weight: 600; }
.postnav a { color: var(--accent); }

/* PAGINACION */
.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 44px; }
.pagination .page-numbers { padding: 9px 15px; border: 1px solid var(--ash); background: var(--white); font-size: 14px; font-weight: 600; color: var(--primary); }
.pagination .page-numbers.current { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent-dark); }

/* VACIO */
.empty { padding: 80px 0; text-align: center; color: var(--steel); }

/* FOOTER */
.site-footer { background: var(--primary); color: #cfcfcf; margin-top: 40px; }
.site-footer .wrap { padding: 46px 24px 40px; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer b { color: var(--white); font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.site-footer .muted { font-size: 13.5px; color: var(--steel-light); margin-top: 8px; max-width: 40ch; }
.site-footer .fcol a { display: block; color: #cfcfcf; font-size: 14px; margin-bottom: 8px; }
.site-footer .fcol a:hover { color: var(--accent-light); }
.site-footer h5 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--steel-light); margin-bottom: 14px; }
.copyr { border-top: 1px solid rgba(255,255,255,.1); }
.copyr .wrap { padding: 18px 24px; font-size: 12.5px; color: var(--steel-light); }

@media (max-width: 820px) {
  .posts { grid-template-columns: 1fr; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--primary); padding: 12px 24px 20px; gap: 2px; border-top: 1px solid rgba(255,255,255,.1); }
  .nav.open a { width: 100%; }
  .nav-toggle { display: inline-flex; }
  .site-header .bar { position: relative; }
}
