/*
Theme Name: La Garbancera Minimal
Theme URI: https://www.lagarbancera.online/
Author: FactoriaDigital / Maya Comunicación
Author URI: https://factoria360.digital/
Description: Tema editorial minimalista en bloques simétricos para La Garbancera. Hero desde categoría Portada y secciones desde categorías existentes, sin crear categorías nuevas.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: la-garbancera-minimal
Tags: news, blog, grid-layout, custom-logo, featured-images, block-styles
*/

:root {
  --lgm-bg: #f7f4ee;
  --lgm-surface: #fffdfa;
  --lgm-ink: #171514;
  --lgm-muted: #68615c;
  --lgm-line: #ded7cc;
  --lgm-accent: #7f1d1d;
  --lgm-accent-soft: #efe4dc;
  --lgm-dark: #211c19;
  --lgm-radius: 18px;
  --lgm-radius-sm: 12px;
  --lgm-shadow: 0 14px 42px rgba(23, 21, 20, .08);
  --lgm-container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--lgm-bg);
  color: var(--lgm-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--lgm-accent); }

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

.lgm-container {
  width: min(calc(100% - 32px), var(--lgm-container));
  margin-inline: auto;
}

.lgm-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(222, 215, 204, .8);
  background: rgba(247, 244, 238, .94);
  backdrop-filter: blur(16px);
}

.lgm-topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.lgm-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}

.lgm-mark {
  width: 46px;
  height: 46px;
  border: 1px solid var(--lgm-ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1;
  background: var(--lgm-surface);
}

.lgm-site-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.05em;
  line-height: .92;
}

.lgm-site-title a:hover { color: var(--lgm-ink); }

.lgm-site-description {
  margin: 4px 0 0;
  color: var(--lgm-muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lgm-menu,
.lgm-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 0;
}

.lgm-menu a {
  color: var(--lgm-muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lgm-menu a:hover { color: var(--lgm-ink); }

.lgm-main { padding: 34px 0 64px; }

.lgm-hero {
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--lgm-line);
  border-radius: calc(var(--lgm-radius) + 8px);
  background: linear-gradient(180deg, rgba(255,253,250,.9), rgba(255,253,250,.62));
  box-shadow: var(--lgm-shadow);
}

.lgm-hero-head,
.lgm-section-head,
.lgm-archive-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.lgm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--lgm-accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lgm-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.lgm-hero-title,
.lgm-section-title,
.lgm-archive-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 68px);
  line-height: .92;
  letter-spacing: -.055em;
}

.lgm-section-title,
.lgm-archive-title { font-size: clamp(26px, 4vw, 46px); }

.lgm-view-all {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--lgm-line);
  border-radius: 999px;
  color: var(--lgm-muted);
  background: var(--lgm-surface);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lgm-view-all:hover {
  border-color: var(--lgm-ink);
  color: var(--lgm-ink);
}

.lgm-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 18px;
}

.lgm-hero-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lgm-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--lgm-line);
  border-radius: var(--lgm-radius);
  background: var(--lgm-surface);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.lgm-card:hover {
  transform: translateY(-2px);
  border-color: rgba(127,29,29,.35);
  box-shadow: 0 18px 36px rgba(23, 21, 20, .08);
}

.lgm-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--lgm-accent-soft);
}

.lgm-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.lgm-card:hover .lgm-card-media img { transform: scale(1.035); }

.lgm-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(23,21,20,.22);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 8vw, 72px);
  background:
    radial-gradient(circle at 20% 20%, rgba(127,29,29,.08), transparent 34%),
    linear-gradient(135deg, #fbf7ef, #ebe2d5);
}

.lgm-card-body { padding: 16px; }

.lgm-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  color: var(--lgm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lgm-card-meta a { color: var(--lgm-accent); }
.lgm-card-meta a:hover { color: var(--lgm-ink); }

.lgm-card-title {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2.2vw, 26px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.lgm-card.is-hero-main .lgm-card-title {
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -.052em;
}

.lgm-card-excerpt {
  margin: 0;
  color: var(--lgm-muted);
  font-size: 14px;
}

.lgm-card.is-compact .lgm-card-title { font-size: clamp(17px, 2vw, 22px); }
.lgm-card.is-compact .lgm-card-excerpt { font-size: 13px; }

.lgm-ad {
  margin: 26px 0;
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px dashed rgba(127,29,29,.35);
  border-radius: var(--lgm-radius);
  background: linear-gradient(135deg, rgba(255,253,250,.85), rgba(239,228,220,.86));
  text-align: center;
}

.lgm-ad strong {
  display: block;
  color: var(--lgm-accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.lgm-ad span {
  display: block;
  margin-top: 6px;
  color: var(--lgm-muted);
  font-size: 13px;
}

.lgm-section { margin-top: 44px; }

.lgm-section-grid,
.lgm-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.lgm-latest {
  padding-top: 8px;
  border-top: 1px solid var(--lgm-line);
}

.lgm-latest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.lgm-card.is-latest .lgm-card-title {
  font-size: clamp(17px, 1.8vw, 22px);
}

.lgm-card.is-latest .lgm-card-excerpt {
  font-size: 13px;
}

.lgm-empty {
  padding: 24px;
  border: 1px solid var(--lgm-line);
  border-radius: var(--lgm-radius);
  background: var(--lgm-surface);
  color: var(--lgm-muted);
}

.lgm-content-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 44px;
  align-items: start;
}

.lgm-article {
  overflow: hidden;
  border: 1px solid var(--lgm-line);
  border-radius: calc(var(--lgm-radius) + 8px);
  background: var(--lgm-surface);
}

.lgm-article-header { padding: clamp(22px, 4vw, 42px); }

.lgm-article-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 6vw, 70px);
  line-height: .94;
  letter-spacing: -.055em;
}

.lgm-article-excerpt {
  max-width: 660px;
  margin: 16px 0 0;
  color: var(--lgm-muted);
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.42;
}

.lgm-article-media {
  aspect-ratio: 16 / 9;
  background: var(--lgm-accent-soft);
}

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

.lgm-entry-content {
  padding: clamp(22px, 4vw, 42px);
  font-size: 18px;
  line-height: 1.72;
}

.lgm-entry-content p { margin: 0 0 1.25em; }
.lgm-entry-content a { color: var(--lgm-accent); text-decoration: underline; text-underline-offset: 3px; }
.lgm-entry-content h2, .lgm-entry-content h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.05; letter-spacing: -.035em; }

.lgm-sidebar { position: sticky; top: 116px; }

.lgm-widget {
  padding: 20px;
  border: 1px solid var(--lgm-line);
  border-radius: var(--lgm-radius);
  background: var(--lgm-surface);
}

.lgm-widget + .lgm-widget { margin-top: 18px; }

.lgm-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.lgm-pagination .page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--lgm-line);
  border-radius: 999px;
  background: var(--lgm-surface);
  color: var(--lgm-muted);
  font-size: 13px;
  font-weight: 800;
}

.lgm-pagination .current,
.lgm-pagination a:hover {
  border-color: var(--lgm-ink);
  color: var(--lgm-ink);
}

.lgm-site-footer {
  padding: 34px 0 44px;
  border-top: 1px solid var(--lgm-line);
  background: var(--lgm-dark);
  color: #f6efe6;
}

.lgm-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: end;
}

.lgm-footer-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 46px);
  line-height: .95;
  letter-spacing: -.05em;
}

.lgm-footer-text { color: rgba(246,239,230,.7); margin: 8px 0 0; }
.lgm-footer-meta { color: rgba(246,239,230,.65); font-size: 13px; text-align: right; }
.lgm-footer-meta a { color: #f6efe6; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .lgm-topbar,
  .lgm-hero-head,
  .lgm-section-head,
  .lgm-archive-head,
  .lgm-footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
  .lgm-menu, .lgm-menu ul { justify-content: flex-start; }
  .lgm-hero-grid,
  .lgm-content-shell { grid-template-columns: 1fr; }
  .lgm-latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lgm-sidebar { position: static; }
  .lgm-footer-meta { text-align: left; }
}

@media (max-width: 760px) {
  .lgm-main { padding-top: 20px; }
  .lgm-hero-side,
  .lgm-section-grid,
  .lgm-post-grid,
  .lgm-latest-grid { grid-template-columns: 1fr; }
  .lgm-card.is-hero-main .lgm-card-title { font-size: clamp(28px, 9vw, 42px); }
  .lgm-card-body { padding: 14px; }
  .lgm-site-header { position: relative; }
}
