/*
Theme Name: Maminé Blog
Theme URI: https://mamine.local/blog
Author: Maminé
Description: Blog theme for Maminé, designed to coexist with the static restaurant site.
Version: 0.2.0
Text Domain: mamine-blog
Requires at least: 6.0
Requires PHP: 8.3
*/

:root {
  --color-ink: #3b2a22;
  --color-ink-soft: #694c3e;
  --color-cream: #fff8ed;
  --color-cream-deep: #f6ebdd;
  --color-beige-soft: #f2f0e7;
  --color-burgundy: #4c171c;
  --color-gold: #c59a4a;
  --color-sage: #a7b39a;
  --color-sage-soft: #e7ece1;
  --color-sage-pale: #f3f5ef;
  --color-sage-surface: #f8faf5;
  --color-sage-deep: #53644d;
  --color-sage-dark: #3f503b;
  --color-border: rgba(83, 100, 77, 0.24);
  --shadow-soft: 0 22px 60px rgba(63, 80, 59, 0.12);
  --font-display: "Lora", Georgia, serif;
  --font-body: "Montserrat", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--color-sage-pale);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  margin: 0;
  overflow-x: clip;
}

a {
  color: inherit;
}

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

.top-ribbon {
  align-items: center;
  background: var(--color-burgundy);
  color: var(--color-cream);
  display: flex;
  font-family: var(--font-display);
  justify-content: center;
  min-height: 32px;
  text-align: center;
}

.site-header {
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1240px;
  min-height: 92px;
  padding: 0 24px;
}

.brand-mark {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark__icon {
  align-items: center;
  border: 1px solid rgba(83, 100, 77, 0.55);
  border-radius: 999px;
  color: var(--color-sage-deep);
  display: grid;
  height: 54px;
  place-items: center;
  width: 54px;
}

.brand-mark__icon svg {
  fill: none;
  height: 32px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 32px;
}

.brand-mark__text {
  display: grid;
  font-family: var(--font-display);
  line-height: 1;
}

.brand-mark__text span {
  color: var(--color-burgundy);
  font-size: 2rem;
  font-weight: 700;
}

.brand-mark__text small,
.eyebrow {
  color: var(--color-sage-deep);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark__text small {
  font-size: 0.58rem;
  inline-size: 122px;
  letter-spacing: 0.1em;
  line-height: 1.25;
  margin-top: 2px;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: center;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-menu {
  display: none;
}

.mobile-menu summary {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--color-sage-dark);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  list-style: none;
  min-height: 44px;
  min-width: 44px;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu__open {
  display: grid;
  gap: 5px;
  width: 28px;
}

.mobile-menu__open span {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 3px;
}

.mobile-menu__close {
  display: none;
  font-size: 2rem;
  line-height: 1;
}

.mobile-menu[open] .mobile-menu__open {
  display: none;
}

.mobile-menu[open] .mobile-menu__close {
  display: block;
}

.button-link,
.read-more {
  align-items: center;
  background: linear-gradient(135deg, var(--color-sage-deep), var(--color-sage-dark));
  border: 1px solid var(--color-sage-deep);
  border-radius: 999px;
  color: var(--color-cream);
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.06em;
  min-height: 44px;
  padding: 0 24px;
  text-decoration: none;
  text-transform: uppercase;
}

.blog-hero {
  background:
    linear-gradient(90deg, rgba(7, 5, 4, 0.84), rgba(7, 5, 4, 0.42)),
    url("/images/mamine/blog/hero-blog.jpg");
  background-position: center;
  background-size: cover;
  color: #fff8ed;
}

.blog-hero .eyebrow {
  color: var(--color-sage);
}

.blog-hero__inner {
  margin: 0 auto;
  max-width: 1240px;
  padding: 112px 24px;
}

.blog-hero h1,
.article__header h1,
.empty-state h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 500;
  line-height: 0.96;
  margin: 0;
  max-width: 920px;
}

.blog-hero p,
.article__header p,
.article__content,
.post-card__body,
.empty-state p,
.footer p {
  line-height: 1.7;
}

.section,
.article {
  margin: 0 auto;
  max-width: 1240px;
  padding: 72px 24px;
}

.post-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 380px));
  justify-content: center;
}

.post-card,
.empty-state,
.article__image {
  background: var(--color-sage-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.post-card__image {
  background: var(--color-cream-deep);
  display: block;
  min-height: 230px;
  text-decoration: none;
}

.post-card__image img,
.post-card__image span {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(rgba(83, 100, 77, 0.18), rgba(83, 100, 77, 0.18)),
    url("/images/mamine/blog/cuaderno-recetas.jpg");
  background-position: center;
  background-size: cover;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.post-card__body,
.empty-state {
  padding: 28px;
}

.post-card h2,
.footer h2,
.footer h3,
.article__content h2,
.article__content h3 {
  font-family: var(--font-display);
}

.post-card h2 {
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 0 12px;
}

.post-card h2 a {
  text-decoration: none;
}

.article {
  max-width: 940px;
}

.article__header {
  padding: 56px 0 32px;
}

.article__image {
  margin: 0 0 36px;
}

.article__image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.article__content {
  color: var(--color-ink-soft);
  font-size: 1.08rem;
}

.article__content a {
  color: var(--color-sage-deep);
  font-weight: 700;
}

.pagination {
  margin-top: 40px;
  text-align: center;
}

.footer {
  background: var(--color-beige-soft);
  border-top: 1px solid var(--color-border);
  padding: 48px 24px;
}

.footer__inner {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  margin: 0 auto;
  max-width: 1240px;
}

.footer p,
.footer a,
.post-card p {
  color: var(--color-ink-soft);
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 920px) {
  .site-header__inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 18px;
  }

  .site-nav,
  .site-header__inner > .button-link {
    display: none;
  }

  .mobile-menu {
    display: block;
    position: relative;
  }

  .mobile-menu__panel {
    background: var(--color-sage-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 2px;
    min-width: 220px;
    padding: 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
  }

  .mobile-menu__panel a {
    border-radius: 6px;
    color: var(--color-sage-dark);
    font-family: var(--font-display);
    padding: 12px 14px;
    text-decoration: none;
    text-transform: uppercase;
  }

  .mobile-menu__panel a:hover,
  .mobile-menu__panel a:focus-visible {
    background: var(--color-sage-soft);
  }

  .post-grid,
  .footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .brand-mark__icon {
    height: 46px;
    width: 46px;
  }

  .brand-mark__text span {
    font-size: 1.58rem;
  }

  .blog-hero__inner,
  .section,
  .article,
  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .blog-hero h1,
  .article__header h1,
  .empty-state h1 {
    font-size: 3rem;
  }

  .mobile-bottom-nav {
    align-items: center;
    background: linear-gradient(135deg, var(--color-sage-deep), var(--color-sage-dark));
    border-top: 1px solid rgba(167, 179, 154, 0.55);
    bottom: 0;
    color: var(--color-cream);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    left: 0;
    min-height: calc(72px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    position: fixed;
    right: 0;
    z-index: 60;
  }

  .mobile-bottom-nav a {
    align-items: center;
    display: grid;
    font-size: 0.76rem;
    gap: 4px;
    justify-items: center;
    text-decoration: none;
    text-transform: uppercase;
  }

  .mobile-bottom-nav a > span:first-child {
    font-size: 1.3rem;
    line-height: 1;
  }
}
