.blog-page {
  --blog-wine: #7b1c2c;
  --blog-ink: #201614;
  --blog-copper: #b77744;
  --blog-sand: #f5efe6;
  --blog-paper: rgba(255, 255, 255, 0.88);
  --blog-muted: #6f625b;
  width: 100%;
  padding: 150px 6% 110px;
  background:
    radial-gradient(circle at 0% 0%, rgba(183, 119, 68, 0.18), transparent 28%),
    radial-gradient(circle at 100% 12%, rgba(123, 28, 44, 0.14), transparent 30%),
    linear-gradient(180deg, #fbf7f1 0%, #f0e7da 100%);
}

.blog-shell {
  max-width: 1380px;
  margin: 0 auto;
}

.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blog-wine);
}

.blog-kicker::before {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--blog-copper);
}

.archive-list {
  display: grid;
  gap: 8px;
}

.archive-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #5c4e49;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: 0.28s ease;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.tags-list button {
  border: 0;
  background: transparent;
  color: #8f8179;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.28s ease;
}

.tags-list button:hover,
.tags-list button.is-active {
  color: var(--blog-wine);
}

.archive-list button span {
  color: var(--blog-copper);
}

.archive-list button:hover,
.archive-list button.is-active {
  background: rgba(123, 28, 44, 0.08);
  color: var(--blog-wine);
  transform: translateX(4px);
}

.archive-list button.is-active span,
.archive-list button:hover span {
  color: var(--blog-wine);
}

.blog-clear {
  border: 1px solid rgba(123, 28, 44, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blog-wine);
  padding: 13px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.3s ease;
}

.blog-clear:hover {
  background: var(--blog-wine);
  color: #ffffff;
  transform: translateY(-2px);
}

.blog-main {
  min-width: 0;
}

.blog-header {
  max-width: 860px;
  margin-bottom: 28px;
}

.blog-header h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 0.98;
  color: var(--blog-ink);
}

.blog-header p {
  margin: 0;
  color: var(--blog-muted);
  font-size: 18px;
  line-height: 1.85;
  max-width: 760px;
}

.blog-filters {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.blog-filter-panel {
  height: max-content;
  align-self: start;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(123, 28, 44, 0.1);
  box-shadow: 0 18px 44px rgba(36, 21, 19, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-filter-panel summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 22px 64px 22px 28px;
  color: var(--blog-ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.blog-filter-panel summary::-webkit-details-marker {
  display: none;
}

.blog-filter-panel summary::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: var(--blog-copper);
  transform: translateY(-50%);
}

.blog-filter-panel summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(123, 28, 44, 0.08);
  color: var(--blog-wine);
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.blog-filter-panel[open] summary {
  border-bottom: 1px solid rgba(123, 28, 44, 0.08);
  background: rgba(123, 28, 44, 0.03);
}

.blog-filter-panel[open] {
  box-shadow: 0 24px 50px rgba(36, 21, 19, 0.12);
}

.blog-filter-panel[open] summary::after {
  content: "−";
  background: var(--blog-wine);
  color: #ffffff;
}

.blog-filter-panel[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.blog-filter-panel summary:hover::after {
  transform: translateY(-50%) scale(1.06);
}

.blog-filter-panel[open] summary:hover::after {
  transform: translateY(-50%) rotate(180deg) scale(1.06);
}

.blog-filter-panel .archive-list,
.blog-filter-panel .tags-list {
  padding: 22px 24px 24px;
  transform-origin: top center;
}

.blog-filter-panel[open] .archive-list,
.blog-filter-panel[open] .tags-list {
  animation: blogFilterReveal 0.28s ease;
}

@keyframes blogFilterReveal {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.blog-toolbar {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.blog-status {
  margin: 0;
  color: #5f514b;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.blog-card {
  position: relative;
  min-width: 0;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(123, 28, 44, 0.08);
  box-shadow: 0 22px 56px rgba(36, 21, 19, 0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 34px 76px rgba(36, 21, 19, 0.16);
}

.blog-card-media {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(123, 28, 44, 0.18), rgba(30, 18, 16, 0.08)),
    linear-gradient(160deg, #decab4 0%, #f6eee4 100%);
}

.blog-card-media.has-image {
  background-size: cover;
  background-position: center;
}

.blog-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.28));
  transition: opacity 0.35s ease;
}

.blog-card-year {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blog-wine);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-card-number {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 62px;
  padding: 0 14px;
  border-radius: 20px;
  background: rgba(32, 22, 20, 0.76);
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.blog-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px 24px;
  background:
    linear-gradient(180deg, rgba(20, 13, 11, 0.08) 0%, rgba(20, 13, 11, 0.34) 32%, rgba(20, 13, 11, 0.94) 100%);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.blog-card:hover .blog-card-overlay,
.blog-card:focus-within .blog-card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.blog-card:hover .blog-card-media::after,
.blog-card:focus-within .blog-card-media::after {
  opacity: 0;
}

.blog-card-year::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blog-copper);
}

.blog-card-placeholder {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  color: #ffffff;
}

.blog-card-placeholder strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.blog-card-placeholder span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.blog-meta {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-card-overlay h2 {
  margin: 0 0 14px;
  font-size: 29px;
  line-height: 1.12;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.blog-card.blog-card-title-small .blog-card-overlay h2 {
  font-size: 24px;
  line-height: 1.1;
}

.blog-card.blog-card-title-compact .blog-card-overlay h2 {
  font-size: 20px;
  line-height: 1.08;
}

.blog-card-overlay p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.7;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.blog-card-overlay p.blog-card-excerpt-small {
  font-size: 13px;
  line-height: 1.55;
}

.blog-card-overlay .blog-meta {
  margin-bottom: 10px;
}

.blog-card-overlay a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--blog-wine);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.blog-card-overlay a::after {
  content: ">";
  transition: transform 0.3s ease;
}

.blog-card-overlay a:hover::after {
  transform: translateX(6px);
}

.blog-empty {
  max-width: 700px;
  margin: 22px auto 0;
  padding: 34px 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(123, 28, 44, 0.1);
  box-shadow: 0 18px 46px rgba(36, 21, 19, 0.08);
  text-align: center;
}

.blog-empty h2 {
  margin: 0 0 10px;
  color: var(--blog-ink);
}

.blog-empty p {
  margin: 0;
  color: var(--blog-muted);
  line-height: 1.7;
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 54px;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-number,
.page-arrow {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #6a5a53;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(36, 21, 19, 0.08);
  cursor: pointer;
  transition: 0.28s ease;
}

.page-number:hover,
.page-arrow:hover,
.page-number.active {
  background: var(--blog-wine);
  color: #ffffff;
  transform: translateY(-3px);
}

.page-arrow.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.blog-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.blog-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 13, 11, 0.72);
  backdrop-filter: blur(10px);
}

.blog-modal-dialog {
  position: relative;
  width: min(980px, calc(100% - 32px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: auto;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(183, 119, 68, 0.12), transparent 28%),
    #fbf7f1;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.blog-modal-close {
  position: sticky;
  top: 18px;
  left: calc(100% - 66px);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(32, 22, 20, 0.9);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.blog-modal-head,
.blog-modal-body {
  padding-left: clamp(24px, 4vw, 52px);
  padding-right: clamp(24px, 4vw, 52px);
}

.blog-modal-head {
  padding-top: 12px;
  padding-bottom: 18px;
}

.blog-modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(123, 28, 44, 0.1);
  color: var(--blog-wine);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-modal-meta {
  margin: 0 0 10px;
  color: #97857b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.blog-modal-head h2 {
  margin: 0;
  color: #3b2722;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  text-shadow: none;
}

.blog-modal-body {
  padding-bottom: 44px;
}

.blog-modal-body p {
  margin: 0 0 18px;
  color: #463a36;
  font-size: 17px;
  line-height: 1.95;
}

.blog-modal-body p.blog-highlight {
  color: #7b1c2c !important;
  font-weight: 700;
}

.blog-modal-gallery {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.blog-modal-gallery.is-vertical {
  grid-template-columns: 1fr;
  max-width: 560px;
}

.blog-modal-gallery img,
.blog-inline-figure img {
  display: block;
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(36, 21, 19, 0.14);
}

.blog-inline-figure {
  margin: 28px 0;
  max-width: 560px;
}

.blog-modal-body .blog-note {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(123, 28, 44, 0.06);
  color: #6b5952;
}

@media (max-width: 1180px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .blog-page {
    padding: 130px 5% 96px;
  }

  .blog-filters {
    grid-template-columns: 1fr;
  }

  .blog-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-header h1 {
    font-size: clamp(34px, 10vw, 52px);
  }

  .blog-header p {
    font-size: 16px;
  }

  .blog-card-media {
    min-height: 360px;
  }

  .blog-modal-dialog {
    width: calc(100% - 18px);
    margin: 9px auto;
    max-height: calc(100vh - 18px);
    border-radius: 24px;
  }

  .blog-modal-gallery {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .blog-card-overlay {
    opacity: 1;
    transform: translateY(0);
  }

  .blog-card-media::after {
    opacity: 0;
  }
}

/* Responsive modal and pagination polish. */

@media (max-width: 720px) {
  .blog-pagination {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 34px;
    padding: 0 4px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .page-numbers {
    flex: 0 0 auto;
    gap: 8px;
  }

  .page-number,
  .page-arrow {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }

  .blog-modal {
    padding: 8px;
  }

  .blog-modal-dialog {
    width: 100%;
    max-height: calc(100dvh - 16px);
    margin: 0;
    border-radius: 24px;
  }

  .blog-modal-close {
    position: sticky;
    top: 10px;
    left: auto;
    right: 10px;
    float: right;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 10px 10px 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.78);
    background: #7b1c2c;
    color: #ffffff;
    font-size: 30px;
    box-shadow: 0 12px 28px rgba(36, 21, 19, 0.24);
    z-index: 10;
  }

  .blog-modal-head {
    clear: both;
    padding-top: 12px;
  }

  .blog-modal-head,
  .blog-modal-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  .blog-modal-head h2 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.08;
  }

  .blog-modal-body p {
    font-size: 16px;
    line-height: 1.82;
  }
}

@media (max-width: 420px) {
  .blog-pagination {
    gap: 7px;
    margin-left: -4px;
    margin-right: -4px;
    padding-inline: 4px;
  }

  .page-numbers {
    gap: 7px;
  }

  .page-number,
  .page-arrow {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .blog-modal {
    padding: 6px;
  }

  .blog-modal-dialog {
    max-height: calc(100dvh - 12px);
    border-radius: 22px;
  }

  .blog-modal-close {
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    margin: 8px 8px 0 auto;
  }

  .blog-modal-head,
  .blog-modal-body {
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* Mobile blog pager: < current > and always-visible close button. */

@media (max-width: 720px) {
  .blog-pagination {
    justify-content: center;
    overflow: visible;
    padding-bottom: 0;
  }

  .page-numbers {
    display: contents;
  }

  .page-number {
    display: none;
  }

  .page-number.active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .blog-modal {
    z-index: 5000;
  }

  .blog-modal-close {
    position: fixed;
    top: 12px;
    right: 14px;
    left: auto;
    float: none;
    margin: 0;
    z-index: 5002;
  }

  .blog-modal-head {
    clear: none;
    padding-top: 66px;
  }
}

@media (max-width: 420px) {
  .blog-pagination {
    gap: 10px;
    margin-left: 0;
    margin-right: 0;
  }

  .page-number,
  .page-arrow {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .blog-modal-close {
    top: 10px;
    right: 10px;
  }
}

/* Mobile article close button beside the entry tag. */

@media (max-width: 720px) {
  .blog-modal-dialog {
    position: relative;
  }

  .blog-modal-close {
    position: absolute;
    top: 18px;
    right: 24px;
    left: auto;
    float: none;
    width: auto;
    min-width: 86px;
    height: 36px;
    margin: 0;
    padding: 0 12px;
    gap: 6px;
    border: 1px solid rgba(123, 28, 44, 0.16);
    border-radius: 999px;
    background: #7b1c2c;
    box-shadow: 0 10px 22px rgba(123, 28, 44, 0.22);
    font-size: 0;
    line-height: 1;
    z-index: 12;
  }

  .blog-modal-close::before {
    content: "Cerrar";
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .blog-modal-close::after {
    content: "×";
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
  }

  .blog-modal-head {
    padding-top: 20px;
    padding-right: 126px;
  }
}

@media (max-width: 420px) {
  .blog-modal-close {
    top: 17px;
    right: 18px;
    min-width: 78px;
    height: 34px;
    padding-inline: 10px;
  }

  .blog-modal-close::before {
    font-size: 11px;
  }

  .blog-modal-head {
    padding-top: 18px;
    padding-right: 112px;
  }
}

/* Mobile article close button at the bottom. */

@media (max-width: 720px) {
  .blog-modal-dialog {
    padding-bottom: 78px;
  }

  .blog-modal-close {
    position: fixed;
    top: auto;
    right: 50%;
    bottom: 14px;
    left: auto;
    transform: translateX(50%);
    width: min(320px, calc(100% - 40px));
    min-width: 0;
    height: 50px;
    padding: 0 18px;
    border-radius: 999px;
    box-shadow: 0 16px 34px rgba(123, 28, 44, 0.28);
  }

  .blog-modal-head {
    padding-top: 20px;
    padding-right: 24px;
  }

  .blog-modal-body {
    padding-bottom: 20px;
  }
}

@media (max-width: 420px) {
  .blog-modal-dialog {
    padding-bottom: 74px;
  }

  .blog-modal-close {
    right: 50%;
    bottom: 10px;
    width: calc(100% - 32px);
    height: 48px;
    transform: translateX(50%);
  }

  .blog-modal-head {
    padding-top: 18px;
    padding-right: 22px;
  }
}