/* CRONOS-003.4A — Home gráfica */

/* Fondo integrado con los colores del asistente */
body {
  background:
    radial-gradient(circle at 0% 23%,
      rgba(157,131,244,.13), transparent 32%),
    radial-gradient(circle at 97% 69%,
      rgba(157,131,244,.17), transparent 35%),
    var(--bg);
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 390px;
  padding: clamp(36px, 5vw, 65px);
  padding-right: 46%;
  text-align: left;
  border-color: var(--border);
  background:
    radial-gradient(ellipse at 73% 30%,
      rgba(166,138,246,.25), transparent 70%),
    var(--surface);
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 2%;
  top: 12%;
  width: 45%;
  height: 77%;
  background-image: var(--home-hero-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 24px;
}

.home-hero .eyebrow,
.home-hero h1,
.home-hero p {
  text-align: left;
}

.home-hero h1 {
  font-size: clamp(3.4rem, 7vw, 6rem);
  letter-spacing: -.055em;
}

.home-hero .hero-description {
  margin-left: 0;
  margin-right: 0;
  max-width: 420px;
}

.home-hero .hero-actions {
  justify-content: flex-start;
}

.home-hero .feature-note {
  font-size: .75rem;
}

/* Tarjetas de categorías */
.home-categories {
  padding-top: 38px;
}

.home-categories .section-heading {
  margin-bottom: 15px;
}

.home-categories .category-grid {
  gap: 18px;
  min-width: 0;
}

.home-category-card {
  min-width: 0;
  min-height: 260px;
  padding: 12px;
  border-radius: 23px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  gap: 12px;
  box-shadow: var(--shadow);
}

.home-category-card .category-icon {
  display: none;
}

.home-category-media {
  height: 170px;
  border-radius: 17px;
  background: var(--glow);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.home-category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-category-card > div:last-child {
  padding: 0 8px 6px;
}

.home-category-card h3 {
  font-size: 1.22rem;
}

.home-category-card p {
  font-size: .82rem;
}

.home-category-placeholder {
  background: linear-gradient(
    130deg,
    rgba(152,122,232,.25),
    rgba(152,122,232,.08)
  );
}

.home-grid-static {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Carrusel cuando hay más de tres categorías activas */
.home-grid-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  grid-template-columns: none;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 4px;
}

.home-grid-scroll::-webkit-scrollbar {
  display: none;
}

.home-grid-scroll > * {
  scroll-snap-align: start;
}

.home-carousel-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.home-carousel-arrow {
  width: 43px;
  height: 43px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-size: 1.65rem;
  cursor: pointer;
}

.home-carousel-arrow:disabled {
  opacity: .3;
  cursor: default;
}

.home-carousel-indicator {
  color: var(--muted);
  font-size: .83rem;
  min-width: 72px;
  text-align: center;
}

.footer-actions .btn {
  border-radius: 100px;
  padding-inline: 25px;
}

@media (max-width: 900px) {
  .home-hero {
    padding-right: 40%;
  }

  .home-hero::after {
    width: 38%;
  }

  .home-grid-scroll {
    grid-auto-columns: calc((100% - 18px) / 2);
  }

  .home-grid-static {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .home-hero {
    text-align: center;
    padding: 28px 20px;
    padding-bottom: 195px;
    min-height: 0;
  }

  .home-hero .eyebrow,
  .home-hero h1,
  .home-hero p {
    text-align: center;
  }

  .home-hero .hero-description {
    margin-inline: auto;
  }

  .home-hero .hero-actions {
    justify-content: center;
  }

  .home-hero::after {
    top: auto;
    bottom: 12px;
    left: 12%;
    right: 12%;
    width: 76%;
    height: 180px;
  }

  .home-grid-static {
    grid-template-columns: 1fr;
  }

  .home-grid-scroll {
    grid-auto-columns: 100%;
  }

  .home-category-card {
    min-height: 225px;
  }

  .home-category-media {
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-grid-scroll {
    scroll-behavior: auto;
  }
}
/* CRONOS-003.4B — Categoria provisional */
.home-category-demo {
  cursor: default;
}

.home-category-demo .home-category-media {
  background:
    radial-gradient(circle at 50% 45%,
      rgba(158, 122, 239, .35), transparent 65%),
    linear-gradient(135deg, #eee7ff, #ded3fa);
}

.home-demo-symbol {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 2px dashed #9376e1;
  border-radius: 24px;
  color: #6949c9;
  font-size: 4rem;
  font-weight: 300;
}

.home-category-demo h3 {
  color: var(--text);
}

.home-category-demo p {
  color: var(--muted);
}

/* CRONOS-003.4D — Integracion grafica de Home */

/* Fusionar el contorno de la imagen con el banner */
.home-hero::after {
  -webkit-mask-image: radial-gradient(
    ellipse 76% 76% at 50% 51%,
    #000 37%,
    rgba(0,0,0,.95) 55%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 76% 76% at 50% 51%,
    #000 37%,
    rgba(0,0,0,.95) 55%,
    transparent 100%
  );
}

/* Mostrar completo el recorte horizontal */
.home-category-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.home-category-media {
  background: var(--glow);
}

/* Flechas exteriores a izquierda y derecha */
.home-carousel-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.home-carousel-shell .home-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(42,28,99,.17);
  font-size: 1.9rem;
  line-height: 1;
}

.home-carousel-shell .home-prev {
  left: -20px;
}

.home-carousel-shell .home-next {
  right: -20px;
}

.home-carousel-shell .home-carousel-arrow:disabled {
  opacity: .28;
}

/* Contador innecesario */
.home-carousel-indicator,
.home-carousel-controls {
  display: none !important;
}

@media (max-width: 580px) {
  .home-carousel-shell .home-prev {
    left: -7px;
  }

  .home-carousel-shell .home-next {
    right: -7px;
  }

  .home-carousel-shell .home-carousel-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.55rem;
  }

  .home-hero::after {
    -webkit-mask-image: radial-gradient(
      ellipse at center,
      #000 35%,
      transparent 78%
    );
    mask-image: radial-gradient(
      ellipse at center,
      #000 35%,
      transparent 78%
    );
  }
}

/* CRONOS-003.4F.2 — Home refinada */

/* Banner compacto */
.home-hero {
  min-height: 300px;
  padding: clamp(24px, 3.4vw, 42px);
  padding-right: 46%;
  border-radius: 28px;
}

.home-hero h1 {
  font-size: clamp(3rem, 5.8vw, 5.1rem);
  line-height: 1.02;
}

.home-hero::after {
  top: 5%;
  right: 2%;
  width: 46%;
  height: 90%;

  -webkit-mask-image: radial-gradient(
    ellipse closest-side at center,
    #000 38%,
    rgba(0,0,0,.85) 57%,
    transparent 100%
  );

  mask-image: radial-gradient(
    ellipse closest-side at center,
    #000 38%,
    rgba(0,0,0,.85) 57%,
    transparent 100%
  );
}

/* Botones del banner */
.home-hero .hero-actions > * {
  border-radius: 999px;
  min-height: 45px;
  padding-inline: 22px;
  font-weight: 750;
}

.home-hero #new-game::before {
  content: "▶";
  margin-right: 10px;
  font-size: .75em;
}

/* Tarjetas: conservar todo el dibujo */
.home-category-media {
  height: 190px;
  background: #eee7fa;
  overflow: hidden;
}

.home-category-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.home-category-card {
  min-height: 0;
  padding: 10px;
}

/* Flechas laterales sin contador */
.home-carousel-shell .home-carousel-arrow:disabled {
  visibility: hidden;
}

.home-carousel-indicator,
.home-carousel-controls {
  display: none !important;
}

/* Botones inferiores */
.footer-actions .btn,
.footer-actions button,
.footer-actions a {
  border-radius: 999px;
}

/* Móvil y tablet */
@media (max-width: 900px) {
  .home-hero {
    padding-right: 41%;
  }

  .home-hero::after {
    width: 40%;
  }
}

@media (max-width: 580px) {
  .home-hero {
    min-height: 0;
    padding: 24px 18px 185px;
  }

  .home-hero::after {
    top: auto;
    bottom: 6px;
    left: 14%;
    right: 14%;
    width: 72%;
    height: 180px;
  }

  .home-category-media {
    height: 175px;
  }

  .home-grid-scroll {
    grid-auto-columns: 100%;
  }
}

/* CRONOS-003.4G_HOME_ASSETS */

.home-hero {
  min-height: 300px;
  padding: clamp(24px, 3.4vw, 42px);
  padding-right: 47%;
}

.home-hero::after {
  background-image: var(--home-hero-image);
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  filter: none !important;
  opacity: 1;
  top: 3%;
  right: 1%;
  width: 47%;
  height: 94%;
}

.home-category-card {
  overflow: hidden;
  border-radius: 24px;
}

.home-category-media {
  height: clamp(170px, 18vw, 225px);
  overflow: hidden;
  background: #eee5fc;
  border-radius: 17px;
}

.home-category-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 15px;
}

.home-hero .hero-actions > * {
  border-radius: 999px !important;
  min-height: 46px;
  padding-inline: 23px;
}

.home-hero .hero-actions > :nth-child(2)::before {
  content: "📖";
  display: inline-block;
  margin-right: 9px;
}

.footer-actions button,
.footer-actions a,
.footer-actions .btn {
  border-radius: 999px !important;
}

@media (max-width: 900px) {
  .home-hero {
    padding-right: 42%;
  }

  .home-hero::after {
    width: 41%;
  }
}

@media (max-width: 580px) {
  .home-hero {
    padding: 25px 18px 205px;
    min-height: 0;
  }

  .home-hero::after {
    top: auto;
    bottom: 4px;
    left: 8%;
    right: 8%;
    width: 84%;
    height: 200px;
  }

  .home-category-media {
    height: 200px;
  }

  .home-grid-scroll {
    grid-auto-columns: 100%;
  }
}