/* ==============================
   FUENTE DE MARCA
   ============================== */
@font-face {
  font-family: "Museo900";
  src: url("https://revistayoung.es/wp-content/uploads/2024/11/museo-900-regular.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==============================
   VARIABLES GLOBALES
   ============================== */
:root {
  --radius-card: 8px;
  --radius-chip: 6px;

  --font-headline: "Museo900", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --bg-page: #ffffff;
  --bg-social: #ffbf00;
  --bg-chip: #ef294a;

  --text-main: #000000;
  --text-invert: #ffffff;
}

/* ==============================
   RESET + BASE
   ============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-page);
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.5;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

@media (min-width: 768px) {
  .page {
    padding: 40px 32px 80px;
  }
}

/* ==============================
   CABECERA / LOGO
   ============================== */
.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.brand__logo {
  max-width: 260px;
  height: auto;
}

@media (min-width: 768px) {
  .brand {
    justify-content: flex-start;
  }

  .brand__logo {
    max-width: 320px;
  }
}

/* =========================
   HERO CARD (carrusel)
   ========================= */
.hero-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  width: 100%;
  height: 450px; /* móvil */
  background-color: #000;
  display: none; /* se hace block con JS */
  margin: 0 auto 24px;
}

@media (min-width: 1024px) {
  .hero-card {
    height: 450px; /* desktop */
  }
}

.hero-card__link {
  all: unset;
  cursor: pointer;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

/* imagen de fondo dinamica */
.hero-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transform: scale(1);
}

/* overlay oscuro 30% */
.hero-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}

/* CONTENEDOR DE TEXTO DEL HERO */
.hero-card__content {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  color: var(--text-invert);
  max-width: calc(100% - 40px);
  display: block;
  bottom: 55px; /* levantamos para que quepan los toggles en móvil */
}

@media (min-width: 1024px) {
  .hero-card__content {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    right: auto;
    left: 20px;
    max-width: 50%;
    width: 50%;
  }
}

/* TITULAR HERO */
.hero-card__title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--text-invert);
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: none;
  margin: 0;
}

@media (min-width:768px){
  .hero-card__title {
    font-size: 2.4rem;
    line-height: 1.2;
  }
}

/* TOGGLES DEL CARRUSEL */
.hero-card__toggles {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: row;
  gap: 8px;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
}

@media (min-width:1024px) {
  .hero-card__toggles {
    left: auto;
    right: 20px;
    bottom: 20px;
    transform: none;
    gap: 10px;
  }
}

.hero-card__toggle-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background-color: transparent;
  border: 1px solid rgba(255,255,255,1);
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  line-height: 0;
  appearance: none;
  background-clip: padding-box;
  transition: background-color 0.15s ease,
              transform 0.15s ease;
}

.hero-card__toggle-dot.is-active {
  background-color: rgba(255,255,255,1);
  border: 1px solid rgba(255,255,255,1);
  transform: scale(1.1);
}

@media (min-width:1024px) {
  .hero-card__toggle-dot:hover {
    transform: scale(1.2);
  }
}

/* ANIMACIÓN ZOOM-OUT */
@keyframes heroZoomOut {
  0%   { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.hero-card__bg--animate {
  animation: heroZoomOut 3s ease-out forwards;
  will-change: transform;
}

/* ==============================
   BLOQUE SOCIAL
   ============================== */
.social-block {
  background-color: var(--bg-social);
  border-radius: 0;
  margin: 0 0 24px;
  width: 100%;
}

.social-block__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
}

.social-block__title {
  font-family: var(--font-headline);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  text-transform: uppercase;
}

.social-block__icons {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 3px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
  height: 60px;
  width: auto;
  padding: 0;
}

.social-icon__img {
  display: block;
  height: 100%;
  width: auto;
  max-height: 100%;
  max-width: 100%;
  transform-origin: center center;
}

.social-icon__img--ig {
  transform: scale(0.8);
}
.social-icon__img--yt {
  transform: scale(0.65);
}
.social-icon__img--tt {
  transform: scale(0.65);
}

@media (min-width: 768px) {
  .social-block__inner {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
  }

  .social-block__title {
    margin-right: auto;
    font-size: 1.2rem;
    color: var(--text-invert);
  }

  .social-block__icons {
    column-gap: 5px;
  }

  .social-icon {
    height: 70px;
  }

  .social-icon__img--ig {
    transform: scale(0.8);
  }
  .social-icon__img--yt {
    transform: scale(0.6);
  }
  .social-icon__img--tt {
    transform: scale(0.6);
  }

  /* hover grow solo desktop */
  .social-icon:hover .social-icon__img {
    transform: scale(1.08);
    transition: transform 0.25s ease;
  }
}

/* ==============================
   CATEGORÍAS
   ============================== */

.categories {
  margin-bottom: 24px;
}

/* móvil: carrusel tipo chips en filas flex-wrap */
.categories--scroll {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  padding: 0 20px 4px;
}

.cat-link {
  flex-shrink: 0;
  background-color: var(--bg-chip);
  border-radius: var(--radius-chip);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-invert);
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.25s ease,
              transform 0.25s ease,
              box-shadow 0.25s ease;
  white-space: nowrap;
}

@media (min-width:1024px) {
  /* desktop: una fila que llena ancho disponible */
  .categories--scroll {
    max-width: 1280px;
    margin: 0 auto 24px;
    padding: 0 32px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 12px;
    justify-content: center;
    align-items: center;
  }

  .cat-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    font-size: 1.2rem;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    border-radius: var(--radius-chip);
  }

  .cat-link:hover {
    background-color: #d71f3d;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  }
}

/* ==============================
   PROMO GRID (destacados + CTAs)
   ============================== */

.promo-grid {
  max-width: 1280px;
  margin: 24px auto 40px;
  padding: 0 16px; /* mismo lateral que hero en móvil */
  display: grid;
  grid-template-columns: 1fr;   /* móvil: una columna */
  row-gap: 20px;
}

/* Tarjeta clicable (apps / revistas) */
.promo-card {
  border-radius: var(--radius-card);
  background-color: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-card__media {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: #ef294a;
  flex-grow: 1;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* título overlay dentro de la imagen */
.promo-card__header {
  position: absolute;
  top: 10px;      /* móvil */
  left: 10px;
  z-index: 2;
  padding: 0;
  margin: 0;
}

.promo-card__title {
  font-family: var(--font-headline);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  text-transform: none;
}

/* imágenes */
.promo-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* apps usa siempre la misma imagen (cuadrada) */
.promo-card__img--unique {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* revistas tiene dos formatos:
   por defecto (móvil): mostramos la cuadrada */
.promo-card__img--desktop {
  display: none;
}

.promo-card__img--mobile {
  display: block;
}

/* CTA stack */
.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* BOTONES CTA */
.cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  border-radius: var(--radius-card);
  padding: 12px 16px;
  border: 0;
  background-clip: padding-box;
  transition: background-color 0.25s ease,
              transform 0.25s ease,
              box-shadow 0.25s ease;
}

.cta-btn--light {
  background-color: #f3f3f3;
  color: #000;
}

.cta-btn--dark {
  background-color: #2f2f2f;
  color: var(--text-invert);
}

/* DESKTOP PROMO GRID */
@media (min-width:1024px) {

  .promo-grid {
    padding: 0 32px;
    max-width: 1280px;
    margin: 24px auto 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;    /* 2 columnas */
    grid-template-rows: auto auto;     /* 2 filas */
    column-gap: 40px;
    row-gap: 24px;
    align-items: start;
  }

  /* Izquierda: apps ocupa toda la altura */
  .promo-card--left {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  /* Derecha arriba: revistas */
  .promo-card--right {
    grid-column: 2;
    grid-row: 1;
  }

  /* Botones debajo de revistas */
  .cta-stack {
    grid-column: 2;
    grid-row: 2;
  }

  /* en desktop movemos un pelín más el título */
  .promo-card__header {
    top: 12px;
    left: 12px;
  }

  .promo-card__title {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .promo-card__media {
    min-height: 260px;
  }

  /* En desktop:
     - usamos imagen horizontal para revistas
     - ocultamos cuadrada
     - apps sigue usando su imagen única tal cual */
  .promo-card__img--desktop {
    display: block;
  }

  .promo-card__img--mobile {
    display: none;
  }

  .promo-card__img--unique {
    display: block;
  }

  /* Hover animado, igual que categorías */
  .promo-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  }

  .cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  }
}
