/* ==========================================================================
   5 Almuerzos Blog — main.css
   ========================================================================== */

:root {
  --cinco-green: #5d8f2e;
  --cinco-green-dark: #4e7b26;
  --cinco-green-soft: #eef4e8;
  --cinco-green-softer: #f6faf2;
  --cinco-ink: #1f2933;
  --cinco-muted: #5a6b7a;
  --cinco-border: #e2e8f0;
  --cinco-white: #ffffff;
  --cinco-surface: #f8faf8;
  --cinco-font: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --cinco-radius: 1rem;
  --cinco-gutter: clamp(1.25rem, 4vw, 1.75rem);
  --cinco-max: 72rem;
  --cinco-read: 42rem;
  --cinco-shadow: 0 18px 40px -28px rgba(31, 41, 51, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--cinco-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--cinco-ink);
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(93, 143, 46, 0.14), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(93, 143, 46, 0.08), transparent 55%),
    var(--cinco-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cinco-green-dark); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--cinco-green); }

.wrap {
  width: min(100% - (var(--cinco-gutter) * 2), var(--cinco-max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--cinco-ink);
  color: #fff;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 0.7rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--cinco-green);
  color: #fff;
}
.btn-primary:hover { background: var(--cinco-green-dark); color: #fff; }
.btn-secondary {
  background: #fff;
  color: var(--cinco-ink);
  border-color: var(--cinco-border);
}
.btn-secondary:hover { border-color: #cbd5e1; color: var(--cinco-ink); }
.btn-ghost {
  background: transparent;
  color: var(--cinco-ink);
  border-color: rgba(31, 41, 51, 0.16);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--cinco-ink);
  border-color: rgba(31, 41, 51, 0.28);
}
.btn-lg { padding: 0.9rem 1.4rem; font-size: 1rem; }
.w-full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--cinco-border);
  box-shadow: 0 8px 24px -20px rgba(31, 41, 51, 0.45);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.25rem;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-header__logo .custom-logo-link {
  display: inline-flex;
  line-height: 0;
}
.site-header__logo img,
.site-header__logo .custom-logo {
  height: 1.35rem;
  width: auto;
}
.site-header__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--cinco-green-soft);
  color: var(--cinco-green-dark);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.site-nav__link {
  padding: 0.45rem 0.7rem;
  border-radius: 0.55rem;
  color: var(--cinco-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--cinco-ink);
  background: var(--cinco-green-softer);
}
.site-header__actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}
.site-header__login {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cinco-ink);
  text-decoration: none;
}
.site-header__login:hover { color: var(--cinco-green-dark); }
.site-header__toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--cinco-ink);
  cursor: pointer;
}
.site-header__toggle:hover { background: var(--cinco-green-softer); }

.site-mobile-menu {
  border-top: 1px solid var(--cinco-border);
  background: #fff;
  padding: 1rem var(--cinco-gutter) 1.25rem;
}
.site-mobile-menu[hidden] { display: none !important; }
.site-mobile-menu nav {
  display: grid;
  gap: 0.35rem;
}
.site-mobile-menu a {
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  color: var(--cinco-ink);
  font-weight: 600;
  text-decoration: none;
}
.site-mobile-menu a:hover { background: var(--cinco-green-softer); }
.site-mobile-menu .btn { margin-top: 0.5rem; justify-content: center; }

@media (min-width: 900px) {
  .site-nav,
  .site-header__actions { display: flex; }
  .site-header__toggle,
  .site-mobile-menu { display: none !important; }
  .site-header__brand { flex: 0 0 auto; }
  .site-nav { flex: 1; justify-content: center; }
}

/* ---------- Blog hero (home) ---------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.75rem, 7vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem);
}
.blog-hero__glow {
  position: absolute;
  inset: auto auto -20% -10%;
  width: min(70vw, 34rem);
  height: min(70vw, 34rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 143, 46, 0.18), transparent 68%);
  pointer-events: none;
  animation: cinco-float 10s ease-in-out infinite;
}
.blog-hero__inner {
  position: relative;
  max-width: 44rem;
}
.blog-hero__eyebrow,
.archive-hero__eyebrow,
.single-hero__eyebrow,
.blog-cta__eyebrow,
.single-aside__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cinco-green);
}
.blog-hero__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--cinco-ink);
  text-wrap: balance;
  animation: cinco-rise 0.7s ease both;
}
.blog-hero__lead {
  margin: 1.1rem 0 0;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--cinco-muted);
  animation: cinco-rise 0.7s ease 0.08s both;
}
.blog-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
  animation: cinco-rise 0.7s ease 0.16s both;
}

@keyframes cinco-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cinco-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ---------- Archive hero ---------- */
.archive-hero {
  padding: clamp(2.25rem, 5vw, 3.25rem) 0 1.25rem;
}
.archive-hero__title {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}
.archive-hero__desc {
  margin-top: 0.75rem;
  max-width: 36rem;
  color: var(--cinco-muted);
}
.archive-hero__desc p { margin: 0; }

/* ---------- Feed / cards ---------- */
.blog-feed {
  padding: 0.5rem 0 3.5rem;
  display: grid;
  gap: 2rem;
}

.post-card {
  display: grid;
  background: #fff;
  border: 1px solid var(--cinco-border);
  border-radius: calc(var(--cinco-radius) + 0.15rem);
  overflow: hidden;
  box-shadow: var(--cinco-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: #d4e3c4;
  box-shadow: 0 22px 48px -28px rgba(31, 41, 51, 0.4);
}
.post-card__media {
  display: block;
  background: var(--cinco-green-softer);
  text-decoration: none;
  overflow: hidden;
}
.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  transition: transform 0.45s ease;
}
.post-card:hover .post-card__img { transform: scale(1.03); }
.post-card__placeholder {
  display: block;
  aspect-ratio: 3 / 2;
  background:
    linear-gradient(135deg, var(--cinco-green-soft), var(--cinco-green-softer) 55%, #fff);
}
.post-card__body {
  display: grid;
  gap: 0.7rem;
  padding: 1.25rem 1.3rem 1.4rem;
  align-content: start;
}
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--cinco-muted);
}
.post-card__cat {
  color: var(--cinco-green-dark);
  font-weight: 700;
  text-decoration: none;
}
.post-card__cat:hover { text-decoration: underline; }
.post-card__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 750;
  text-wrap: balance;
}
.post-card__title a {
  color: inherit;
  text-decoration: none;
}
.post-card__title a:hover { color: var(--cinco-green-dark); }
.post-card__excerpt {
  margin: 0;
  color: var(--cinco-muted);
  font-size: 0.975rem;
}
.post-card__more {
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cinco-green-dark);
  text-decoration: none;
}
.post-card__more:hover { gap: 0.55rem; }

.post-card--featured {
  grid-template-columns: 1fr;
}
.post-card--featured .post-card__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.08;
}
.post-card--featured .post-card__body { padding: 1.5rem 1.5rem 1.65rem; }
.post-card--featured .post-card__img,
.post-card--featured .post-card__placeholder { aspect-ratio: 16 / 9; }

.post-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 980px) {
  .post-card--featured {
    grid-template-columns: 1.25fr 1fr;
    align-items: stretch;
  }
  .post-card--featured .post-card__img,
  .post-card--featured .post-card__placeholder {
    aspect-ratio: auto;
    min-height: 100%;
  }
  .post-card--featured .post-card__body {
    padding: 2rem 2rem 2.1rem;
    align-content: center;
  }
}

/* ---------- Pagination ---------- */
.pagination__list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}
.pagination__list a,
.pagination__list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid var(--cinco-border);
  background: #fff;
  color: var(--cinco-ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.pagination__list a:hover {
  border-color: #d4e3c4;
  background: var(--cinco-green-softer);
}
.pagination__list .current {
  background: var(--cinco-green);
  border-color: var(--cinco-green);
  color: #fff;
}

/* ---------- Single ---------- */
.single-hero {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 1.25rem;
}
.single-hero__inner { max-width: 46rem; }
.single-hero__eyebrow a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.single-hero__eyebrow a:hover { text-decoration: underline; }
.single-hero__title {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
.single-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  margin-top: 1rem;
  color: var(--cinco-muted);
  font-size: 0.9375rem;
}

.single-cover {
  margin: 0 auto 2rem;
}
.single-cover__img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  border-radius: calc(var(--cinco-radius) + 0.15rem);
  border: 1px solid var(--cinco-border);
}

.single-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 1rem;
}
@media (min-width: 980px) {
  .single-layout {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
    gap: 3rem;
    align-items: start;
  }
}

.entry-content {
  max-width: var(--cinco-read);
  font-size: 1.125rem;
  line-height: 1.75;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 750;
}
.entry-content h2 { font-size: 1.55rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content p,
.entry-content ul,
.entry-content ol { margin: 0 0 1.15rem; color: #334155; }
.entry-content ul,
.entry-content ol { padding-left: 1.25rem; }
.entry-content li + li { margin-top: 0.35rem; }
.entry-content a { font-weight: 600; }
.entry-content blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.15rem;
  border-left: 3px solid var(--cinco-green);
  color: var(--cinco-ink);
  font-weight: 500;
}
.entry-content img {
  border-radius: 0.85rem;
  margin: 1.5rem 0;
}
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--cinco-muted);
}
.entry-content pre,
.entry-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.entry-content pre {
  overflow: auto;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #e2e8f0;
}

.single-aside { position: relative; }
.single-aside__card {
  position: sticky;
  top: 5.5rem;
  padding: 1.35rem 1.35rem 1.45rem;
  border-radius: var(--cinco-radius);
  border: 1px solid #d9e8c9;
  background:
    linear-gradient(180deg, var(--cinco-green-softer), #fff 70%);
  box-shadow: var(--cinco-shadow);
}
.single-aside__title {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  font-weight: 750;
}
.single-aside__text {
  margin: 0 0 1.1rem;
  font-size: 0.925rem;
  color: var(--cinco-muted);
}
.single-aside__link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.single-aside__link:hover { text-decoration: underline; }

.single-footer {
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--cinco-border);
  margin-top: 2.5rem;
}
.single-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.single-tags__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--cinco-muted);
  margin-right: 0.25rem;
}
.single-tags__item {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--cinco-green-softer);
  color: var(--cinco-green-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}
.single-tags__item:hover { background: var(--cinco-green-soft); }

.single-nav {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .single-nav { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}
.single-nav a {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--cinco-border);
  border-radius: 0.85rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.single-nav a:hover {
  border-color: #d4e3c4;
  background: var(--cinco-green-softer);
}
.single-nav__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cinco-muted);
}
.single-nav__title {
  font-weight: 700;
  letter-spacing: -0.015em;
}
.single-nav__next { text-align: right; }
.single-back {
  margin: 1.75rem 0 0;
  font-weight: 600;
}
.single-back a { text-decoration: none; }
.single-back a:hover { text-decoration: underline; }

/* ---------- CTA band ---------- */
.blog-cta {
  margin-top: 0.5rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(2.25rem, 5vw, 3.25rem);
}
.blog-cta__panel {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border-radius: calc(var(--cinco-radius) + 0.25rem);
  border: 1px solid #d5e5c4;
  background:
    radial-gradient(700px 220px at 100% 0%, rgba(93, 143, 46, 0.16), transparent 55%),
    linear-gradient(135deg, #f3f8ec 0%, #fff 58%);
  box-shadow: 0 18px 40px -30px rgba(31, 41, 51, 0.35);
}
@media (min-width: 860px) {
  .blog-cta__panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    padding: 2rem 2.25rem;
  }
}
.blog-cta__eyebrow { margin: 0 0 0.55rem; }
.blog-cta__title {
  margin: 0;
  font-size: clamp(1.55rem, 3.2vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 18ch;
  text-wrap: balance;
}
.blog-cta__text {
  margin: 0.55rem 0 0;
  max-width: 38rem;
  font-size: 0.975rem;
  line-height: 1.45;
  color: var(--cinco-muted);
}
.blog-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
@media (min-width: 860px) {
  .blog-cta__actions {
    flex-direction: column;
    align-items: stretch;
    min-width: 12.5rem;
  }
  .blog-cta__actions .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
}
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
@media (min-width: 800px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
}
.site-footer__brand img {
  height: 1.35rem;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.site-footer__tagline {
  margin: 0.9rem 0 0;
  max-width: 22rem;
  font-size: 0.9rem;
  line-height: 1.55;
}
.site-footer__heading {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.site-footer__links a { font-size: 0.925rem; font-weight: 500; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
}
.site-footer__bottom p { margin: 0; }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-footer__bottom strong { color: #fff; }

/* ---------- Empty ---------- */
.empty-state {
  padding: 4rem 0 5rem;
  text-align: center;
}
.empty-state h2 {
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.empty-state p {
  margin: 0 0 1.25rem;
  color: var(--cinco-muted);
}

/* ---------- WP alignment helpers ---------- */
.alignwide { max-width: min(100%, 56rem); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-image img { border-radius: 0.85rem; }
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
