:root {
  /* Colores del mockup del PowerPoint */
  --bg: #ffffff;
  --ink: #000000;
  --header: #000000;
  --accent: #ff0000;
  --muted: #555555;
  --line: #000000;
  --tag-green: #c6efce;
  --tag-gray: #ececec;
  --input-border: #bdbdbd;
  --btn-gray: #9e9e9e;

  /* Misma tipografía que rawg.io: stack de fuentes del sistema */
  --font-display: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-body: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --max: 1120px;
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

main {
  flex: 0 0 auto;
  padding-bottom: 2.5rem;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  color: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.nav a {
  color: #fff;
}

.nav a.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav .btn-colabora {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  font-size: 0.9rem;
}

.nav .btn-colabora:hover {
  filter: brightness(0.95);
}

.breadcrumb {
  padding: 0.85rem 0 0;
}

.breadcrumb--bare {
  padding: 0;
  min-width: 0;
  flex: 1;
}

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 0 0;
}

.blog-toolbar .blog__sort label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb__item a {
  color: var(--ink);
  text-decoration: none;
}

.breadcrumb__item a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb__item [aria-current="page"] span,
.breadcrumb__item:last-child > span:not(.breadcrumb__sep) {
  color: var(--accent);
  font-weight: 700;
}

.breadcrumb__sep {
  color: #999;
}

.hero {
  padding: 2.5rem 0 1.25rem;
  background: var(--bg);
}

.hero__content {
  width: 100%;
  text-align: center;
  animation: rise 0.55s ease both;
}

.hero__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/*
  Título centrado (caja = ancho real del texto).
  Icono absolute a la izquierda: no empuja el centro.
  min-height >= icono para que el subtítulo no quede tapado.
*/
.hero__title-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(42rem, calc(100% - 7rem));
  min-height: var(--hero-icon-size, 5.5rem);
  margin-inline: auto;
}

.hero__title {
  margin: 0;
  width: max-content;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

.hero__title .accent {
  color: var(--accent);
}

.hero__icon {
  --hero-icon-size: 5.5rem;
  position: absolute;
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%);
  width: var(--hero-icon-size);
  height: var(--hero-icon-size);
  object-fit: cover;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
  pointer-events: none;
}

.hero__subtitle {
  display: block;
  width: 100%;
  max-width: 48rem;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: 1rem;
  text-align: center;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .hero__title-wrap {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-height: 0;
    gap: 0.65rem;
  }

  .hero__icon {
    position: static;
    transform: none;
    width: 4.75rem;
    height: 4.75rem;
  }

  .hero__title {
    width: auto;
    font-size: clamp(1.3rem, 5.2vw, 1.7rem);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 4px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-colabora-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  padding: 0.55rem 1.1rem;
  border: 1.5px solid #ff0000;
  border-radius: 6px;
  background: #fff;
  color: #ff0000 !important;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-colabora-outline:hover {
  background: #ff0000;
  color: #fff !important;
  border-color: #ff0000;
  transform: translateY(-1px);
}

.btn--search {
  background: var(--ink);
  color: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn--search:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn--clear {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn--clear:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.filters {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 14px;
  background: #ffffff;
}

.filters__search {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.55rem;
  width: min(640px, 100%);
  margin-inline: auto;
}

.filters__field {
  position: relative;
  display: flex;
  flex: 1 1 220px;
  min-width: 0;
  align-items: center;
}

.filters__icon {
  position: absolute;
  left: 0.9rem;
  display: inline-flex;
  color: #888;
  pointer-events: none;
}

.filters input[type="search"] {
  width: 100%;
  border: 1.5px solid #d8d8d8;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.75rem 1rem 0.75rem 2.55rem;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.filters input[type="search"]::placeholder {
  color: #9a9a9a;
}

.filters input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.12);
}

.filters input[type="search"]::-webkit-search-decoration,
.filters input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 1.1rem;
  border: 1px solid #111;
  border-radius: 999px;
  background-color: #ffffff;
  color: #111;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.tag:hover {
  background: #111;
  border-color: #111;
  color: #fff;
  transform: translateY(-1px);
}

.tag.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

.tag.is-active:hover {
  background: #d40000;
  border-color: #d40000;
  color: #fff;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1rem;
}

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

  .nav {
    gap: 0.65rem;
    font-size: 0.85rem;
  }
}

.game-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: stretch;
  gap: 0.9rem;
  padding: 0.85rem;
  border: 1px solid #e4e4e4;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.5s ease both;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: #cfcfcf;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* La altura la define el texto; la imagen se estira arriba-abajo sin pasarse */
.game-card__cover {
  width: 100%;
  height: 0;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #ddd;
  border-radius: 8px;
  border: 1px solid #ececec;
}

.game-card > div {
  min-width: 0;
}

.game-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--ink);
}

.meta-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
}

.meta-list li {
  position: relative;
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  column-gap: 2rem;
  align-items: center;
  min-height: 1.75rem;
  padding-bottom: 0.45rem;
}

.meta-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #f2f2f2;
  transform: scaleY(0.5);
  transform-origin: bottom;
  pointer-events: none;
}

.meta-list .meta-label {
  width: auto;
  color: var(--ink);
  line-height: 1.75rem;
  display: flex;
  align-items: center;
}

.meta-list .meta-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.meta-list .meta-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  min-height: 1.75rem;
  border: 1px solid #222;
  border-radius: 999px;
  padding: 0 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  background: var(--tag-gray);
  color: var(--ink);
}

/* Una sola etiqueta por fila: mismo ancho, texto centrado */
.meta-list .meta-tags:has(> .meta-value:only-child) > .meta-value {
  width: 11.5rem;
}

.meta-list .meta-value--green {
  background: var(--tag-green);
}

.meta-value__scale {
  font-size: 0.75em;
  font-weight: 100;
  line-height: 0;
}

@media (max-width: 640px) {
  .meta-list li {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }

  .meta-list .meta-tags:has(> .meta-value:only-child) > .meta-value {
    width: min(11.5rem, 100%);
  }
}

.empty {
  padding: 2.5rem 1.5rem;
  margin: 0 0 2.5rem;
  border: 1px dashed #cfcfcf;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #fafafa;
  min-height: 140px;
  display: grid;
  place-items: center;
}

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 2rem;
  padding: 2.25rem 0 3.5rem;
  align-items: start;
}

.article__main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.article__header {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.article__header--blog {
  grid-template-columns: minmax(0, 1fr);
}

.article--blog .article__game-title {
  max-width: 42rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.article__cover {
  width: 160px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid #000;
  margin: 0;
}

.article__summary {
  min-width: 0;
}

.article__summary .meta-list {
  margin: 0;
  max-width: 480px;
}

.article__content {
  width: 100%;
}

.article .meta-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.article__game-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 1rem;
  line-height: 1.2;
  color: var(--ink);
}

.article__content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  margin: 0 0 1rem;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 700;
}

.article__content h3 {
  font-family: var(--font-display);
  margin-top: 1.5rem;
}

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

@media (max-width: 640px) {
  .article__header {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.85rem;
  }

  .article__header--blog {
    grid-template-columns: minmax(0, 1fr);
  }

  .article__cover {
    width: 120px;
  }
}

.prose {
  color: var(--ink);
}

.prose h2 {
  font-family: var(--font-display);
  margin-top: 1.75rem;
  color: var(--ink);
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1rem;
}

.prose a {
  color: var(--accent);
}

.related {
  border-left: 1px solid #ddd;
  padding-left: 1.25rem;
}

@media (max-width: 900px) {
  .related {
    border-left: 0;
    border-top: 1px solid #ddd;
    padding-left: 0;
    padding-top: 1.25rem;
  }
}

.related__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

.related > a {
  display: block;
  padding: 0.4rem 0;
  color: var(--ink);
  border-bottom: 1px solid #eee;
}

.related > a:hover {
  color: var(--accent);
}

.related__action {
  margin-top: 1.25rem;
}

.page {
  padding: 2.25rem 0 3.5rem;
  max-width: 720px;
}

.page.site-shell:not(.blog) {
  max-width: var(--max);
}

.page.site-shell:not(.blog) > * {
  max-width: 720px;
}

.page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 2.6rem);
  margin: 0 0 1.1rem;
  color: var(--ink);
}

.page.blog {
  max-width: 820px;
}

.blog__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.blog__header h1 {
  margin: 0;
}

.blog__sort label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog__sort-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.blog__sort select {
  min-width: 11rem;
  border: 1.5px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.7rem;
  font: inherit;
}

.blog__spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2.5px solid #e5e5e5;
  border-top-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: blog-spin 0.7s linear infinite;
}

@keyframes blog-spin {
  to { transform: rotate(360deg); }
}

.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.blog-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.blog-card__media {
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card__body {
  min-width: 0;
  padding-top: 0.1rem;
}

.blog-card__title {
  display: inline-block;
  color: #1a5fb4;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35;
  text-decoration: none;
}

.blog-card__title:hover {
  text-decoration: underline;
}

.blog-card__meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.blog__pagination {
  margin-top: 1.75rem;
}

@media (max-width: 640px) {
  .blog-card__media {
    width: 96px;
    height: 72px;
  }
}

.form {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

.form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-label-text {
  display: inline;
  line-height: 1.3;
}

.form .req {
  display: inline;
  color: var(--accent);
  font-weight: 700;
  margin-left: 0.15em;
}

.form textarea,
.form input[type="email"],
.form input[type="text"],
.form input[type="password"],
.form input[type="file"],
.form select {
  width: 100%;
  border: 1px solid var(--input-border);
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.form textarea {
  min-height: 160px;
  resize: vertical;
}

.form__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert--ok {
  background: var(--tag-green);
  color: #0f3d16;
}

.alert--error {
  background: #ffe5e5;
  color: #8a0000;
}

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid #e5e5e5;
  padding: 0.7rem 0;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.85rem;
  background: #fff;
}

.site-footer .site-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding: 0;
}

.site-footer__tagline {
  margin: 0;
}

.site-footer strong {
  color: var(--ink);
  font-weight: 700;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 0;
}

.site-footer__links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
