/*
=========================================================
AMD DRIVER HUB — HUB CSS
Hub: featured + curated + landing
Tokens unificados con el tema (radeondriverhub)
=========================================================
*/

:root {
  --rdh-container: 1200px;
  --rdh-gap: 24px;
  --rdh-radius: 18px;
  --rdh-radius-sm: 12px;
  --rdh-card-bg: linear-gradient(180deg, #141b24, #0c1117);
  --rdh-border: 1px solid rgba(255,255,255,.06);
  --rdh-accent: #dc2626;
}

/* Contenedor centrado (hub main, archive). Single uses .rdh-single-inner. */
.hub-container,
.rdh-hub-content .hub-container,
.games-archive-container {
  width: 100%;
  max-width: var(--rdh-container);
  margin-inline: auto;
  padding-inline: var(--rdh-gap);
  box-sizing: border-box;
}

.hub-inner {

  max-width: var(--rdh-container);

  margin-inline: auto;

  padding-inline: var(--rdh-gap);

}


/* Archive /games */

.rdh-archive-title {

  margin: 0 0 32px 0;

  font-size: 28px;

  font-weight: 700;

  color: var(--text-primary, #f3f6fb);

}

.games-archive-container {
  padding-block: 32px 48px;
}

.games-archive-container .hub-container {
  padding-inline: 0;
  max-width: none;
}


/* =========================================================
HERO — full width, height limited (no horizontal boxing)
Steam/AMD look: image can crop vertically only
========================================================= */

.hub-hero-dynamic {
  position: relative;
  width: 100%;
  max-width: none;
  height: 52vh;
  min-height: 320px;
  max-height: 560px;
  margin: 0 0 48px 0;
  overflow: hidden;
  background: #0c1117;
}

.hub-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}


/* overlay */

.hub-hero-overlay {

  position: absolute;

  inset: 0;

  display: flex;

  align-items: flex-end;

  justify-content: center;

  padding: 40px 24px;

  background:

    linear-gradient(
      to top,
      rgba(0,0,0,.75) 0%,
      rgba(0,0,0,.35) 40%,
      rgba(0,0,0,0) 70%
    );

}


/* featured content inside hero — centered */

.hub-hero-featured {

  position: relative;

  display: flex;

  align-items: flex-end;

  gap: 24px;

  max-width: 800px;

  width: 100%;

  z-index: 6;

}

.hub-hero-featured-thumb {

  width: 280px;

  flex-shrink: 0;

  aspect-ratio: 16 / 9;

  border-radius: 12px;

  background-size: cover;

  background-position: center;

  box-shadow:
    0 18px 45px rgba(0,0,0,.7),
    0 0 24px rgba(220,38,38,.2);

}

.hub-hero-featured-meta {

  display: flex;

  flex-direction: column;

  gap: 10px;

}

.hub-hero-label {

  font-size: 13px;

  letter-spacing: .12em;

  text-transform: uppercase;

  color: rgba(255,255,255,.8);

}

.hub-hero-heading {

  font-size: 32px;

  font-weight: 700;

  margin: 0;

  color: #fff;

}

.hub-hero-subtitle {

  margin: 0;

  font-size: 15px;

  color: rgba(255,255,255,.85);

  max-width: 520px;

}


/* Front-page cleanup: visually hide duplicated title/excerpt above hero
   (rdh-hub). Keep for SEO/a11y. 
   Block themes: título/párrafo están en Grupos fuera del bloque Contenido */

body.rdh-hub .wp-block-post-title,
body.rdh-hub .wp-block-post-title a,
body.rdh-hub .wp-block-post-excerpt,
body.rdh-hub .wp-block-post-excerpt p,
body.rdh-hub .wp-block-post-excerpt__excerpt,
body.rdh-hub main > *:has(.wp-block-post-title),
body.rdh-hub main > *:has(.wp-block-post-excerpt),
/* Ocultar Grupos que contienen título/párrafo (están antes del contenido) */
body.rdh-hub main .wp-block-group:has(.wp-block-post-title),
body.rdh-hub main .wp-block-group:has(.wp-block-post-excerpt),
/* Ocultar cualquier Grupo que esté antes del bloque de contenido */
body.rdh-hub main .wp-block-post-content ~ .wp-block-group,
body.rdh-hub main .wp-block-post-content ~ * .wp-block-group {

  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;

}

/* Ocultar cualquier Grupo que esté ANTES de nuestro contenido inyectado */
body.rdh-hub .rdh-hub-content ~ *,
body.rdh-hub .rdh-hub-content ~ .wp-block-group,
body.rdh-hub main > .wp-block-group:not(:has(.rdh-hub-content)):not(:has(.hub-container)) {

  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;

}

/* Ocultar Grupos que están ANTES del bloque de contenido (donde se inyecta nuestro hub) */
body.rdh-hub main .wp-block-post-content ~ *,
body.rdh-hub main > .wp-block-group:first-child:not(:has(.wp-block-post-content)) {

  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;

}


/* title */

.hub-hero-title {

  font-size: 42px;

  font-weight: 700;

  color: #fff;

  margin: 0;

}


/* CTA link for featured game */

.hub-hero-cta {

  display: inline-block;

  text-decoration: none;

}

.hub-hero-cta:hover .hub-hero-title {

  text-decoration: underline;

}

/* clickable */

.hub-hero-link {

  position: absolute;

  inset: 0;

  z-index: 5;

}


/* =========================================================
GRID
========================================================= */

.hub-curated-grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));

  gap: 24px;

}


/* =========================================================
CARD
========================================================= */

.game-card {

  position: relative;

  display: flex;

  flex-direction: column;

  min-height: 320px;

  background:
    linear-gradient(
      180deg,
      #141b24,
      #0c1117
    );

  border-radius: 18px;

  overflow: hidden;

  border: 1px solid rgba(255,255,255,.06);

  cursor: pointer;

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;

}


/* image container */

.game-card .wp-block-post-featured-image {

  width: 100%;

  height: 220px;

  overflow: hidden;

}


/* actual image */

.game-card .wp-block-post-featured-image img {

  width: 100%;

  height: 100%;

  object-fit: cover;

}


/* title */

.game-card .wp-block-post-title {

  padding: 16px 20px;

  font-size: 18px;

}


/* link overlay */

.game-card a.wp-block-post-title__link::after {

  content: "";

  position: absolute;

  inset: 0;

}


/* =========================================================
HOVER
========================================================= */

.game-card:hover {

  transform: translateY(-6px);

  border-color: var(--rdh-accent);

  box-shadow:

    0 20px 60px rgba(0,0,0,.6),

    0 0 30px rgba(220,38,38,.25);

}

/* Botón catálogo completo (hub) */
.rdh-cta-catalog {
  margin: 32px 0 0 0;
  text-align: center;
}
.rdh-btn-catalog {
  display: inline-block;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--rdh-accent);
  border-radius: var(--rdh-radius-sm);
  text-decoration: none;
  transition: filter .2s, transform .2s;
}
.rdh-btn-catalog:hover {
  filter: brightness(1.1);
  color: #fff;
  transform: translateY(-2px);
}

/* =========================================================
RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .hub-hero-dynamic {
    min-height: 260px;
    max-height: 45vh;
  }
  .hub-hero-overlay {
    padding: 24px 20px;
  }
  .hub-hero-featured {
    flex-direction: column;
    align-items: flex-start;
  }
  .hub-hero-featured-thumb {
    width: 100%;
  }
  .hub-hero-title {
    font-size: 24px;
  }
}

