/* ---------------------------------
   @Jael Orea para FCS
-----------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Fahkwang:wght@200;300;400;500;600;700&family=Krub:wght@200;300;400;500;600;700&display=swap');

/* ---------------------------------
   Estilos base
-----------------------------------*/
:root {
  --bg: #fff8ec;
  --bg-soft: rgba(255,255,255,0.18);

  --card: rgba(255,255,255,0.78);
  --card-solid: #F7F4EC;

  --text: #0B2C3A;
  --text-soft: rgba(11,44,58,0.72);

  --primary: #F2A23A;
  --primary-2: #E9892E;

  --mint: #CFE6E3;
  --mint-2: #9FD1CA;

  --shadow: 0 18px 50px rgba(0,0,0,0.18);
  --shadow-soft: 0 10px 26px rgba(0,0,0,0.12);

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;

  --maxw: 920px;
}

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

body {
  min-height: 600px !important;
}

body,
html {
  font-family: 'Krub', sans-serif;
  margin: 0;
  padding: 0;
  background: white;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
}

p {
  color: var(--text);
  font-weight: 500;
}

a {
  color: black;
}

main {
  flex-grow: 1;
  min-height: 600px;
}

.background01 {
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 20% 10%, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(900px 500px at 85% 30%, rgba(255,231,178,0.28) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(9,50,70,0.10) 0%, rgba(9,50,70,0.18) 100%);
  background-attachment: fixed;
}

/* ---------------------------------
   Layout principal
-----------------------------------*/
.title-image {
  width: 100%;
  max-width: 560px;
  margin: 0 0 14px;
  display: flex;
  justify-content: flex-start;
}

.title-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.title-image2 {
  width: 100%;
  max-width: 200px;
  margin: 0 0 14px;
  display: flex;
  justify-content: center;
  margin: 0 auto 14px;
}

.title-image2 img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.introduction-align,
.pages,
.index-container03 {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.introduction-align {
  justify-content: center;
  height: 100%;
}

.pages {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  padding: 22px 14px;
  box-sizing: border-box;
}

#content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#container-interactive {
  width: 100%;
}

.index-container03 {
  width: 100%;
}

/* ---------------------------------
   Pantallas y contenido
-----------------------------------*/
.logo {
  width: 190px;
  height: auto;
  display: block;
}

.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 2px 6px;
  box-sizing: border-box;
}

.screen {
  display: none;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 0 24px;
}

.active {
  display: flex;
}

.screen--center {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen--hero {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card {
  width: min(100%, var(--maxw));
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 22px;
  box-sizing: border-box;
}

.card--wide,
.card--wide2,
.card--wide3 {
  max-width: 820px;
}

.card--hero {
  padding: 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  align-items: center;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-principito,
.img-principito2 {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

.img-wide {
  max-width: 760px;
}

.hero-content {
  text-align: center;
}

.title {
  font-family: 'Krub', sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  margin: 0 0 10px;
  color: var(--text);
}

.subtitle {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.35;
}

.section-title {
  font-family: 'Krub', sans-serif;
  font-weight: 500;
  color: var(--text-soft);
  margin: 2px 0 16px;
  font-size: 1.25rem;
  text-align: center;
}

.kicker {
  margin: 0 0 6px;
  font-weight: 700;
  color: rgba(11,44,58,0.72);
  font-size: 0.95rem;
}

.quiz-age {
  font-family: 'Krub', sans-serif;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}

.style-sentence {
  color: var(--text-soft);
  font-weight: 500;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.35;
  margin: 12px auto 18px;
  text-align: center;
  max-width: 720px;
}

.disclaimer {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: rgba(11,44,58,0.70);
}

/* ---------------------------------
   Botones
-----------------------------------*/
.btn,
.btn-option {
  border: 0;
  cursor: pointer;
  font-family: 'Krub', sans-serif;
  font-weight: 700;
  border-radius: 14px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.btn {
  padding: 14px 18px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.2px;
  box-shadow: var(--shadow-soft);
}

.btn-lg {
  min-height: 54px;
  padding: 16px 22px;
  font-size: 1.05rem;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.btn-primary:active {
  transform: translateY(1px);
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* Age cards */
.age-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 10px 0 6px;
}

.age-card {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(11,44,58,0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  padding: 16px 12px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.age-card:hover {
  transform: translateY(-2px);
}

.age-label {
  font-family: 'Krub', sans-serif;
  font-size: 1.55rem;
  line-height: 1;
  color: var(--primary-2);
  font-weight: 700;
}

.age-sub {
  margin-top: 4px;
  font-size: 0.95rem;
  color: rgba(11,44,58,0.70);
  font-weight: 700;
}

/* Sí / No */
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.btn-yes,
.btn-no {
  min-height: 54px;
  font-size: 1.05rem;
  box-shadow: 0 12px 26px rgba(0,0,0,0.12);
}

.btn-yes {
  background: linear-gradient(
    180deg,
    rgba(255,204,153,1) 0%,
    rgba(255,186,128,1) 100%
  );
  /*background: linear-gradient(180deg, rgba(242,162,58,0.98) 0%, rgba(233,137,46,0.98) 100%);*/
  color: var(--text);
}

.btn-no {
  background: linear-gradient(180deg, rgba(207,230,227,0.95) 0%, rgba(159,209,202,0.95) 100%);
  color: var(--text);
  border: 1px solid rgba(11,44,58,0.10);
}

/*.btn-option:hover {
  transform: translateY(-2px);
}*/

.btn-option:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.20),
    0 0 0 2px rgba(255,159,0,0.24);
}


.btn-option:active {
  transform: translateY(1px);
}

@media (hover: hover) {
  .btn-option:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow:
      0 10px 24px rgba(0,0,0,0.18),
      0 0 0 3px rgba(255,159,0,0.22);
  }
}

/* ---------------------------------
   Feedback
-----------------------------------*/
.feedback {
  background-color: transparent;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feedback h3 {
  color: var(--text);
  margin: 0 0 12px;
  font-family: 'Krub', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.feedback-text {
  width: min(680px, 96%);
  color: var(--text-soft);
  line-height: 1.45;
  margin: 10px 0 0;
  margin-top: 5px !important;
  font-weight: 500;
  text-align: center;
}

/* ---------------------------------
   Barra de progreso
-----------------------------------*/
.progress-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.progress-container {
  width: 100%;
  max-width: 760px;
  height: 14px;
  background-color: rgba(255,255,255,0.85);
  border-radius: 999px;
  margin: 6px 0 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  overflow: hidden;
  border: 1px solid rgba(11,44,58,0.08);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.5s;
}

/* ---------------------------------
   Imagen para el resultado 
-----------------------------------*/
.result-image {
  width: min(220px, 70%);
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 26px rgba(0,0,0,0.12);
  margin: 10px 0 0px;
  background-color: white !important;
  padding: 5px;
}

/* ---------------------------------
   Footer / aviso diagnóstico
-----------------------------------*/
.footer-diagnosis {
  margin-top: 14px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  color: white;
  background-color: #ff9f00;
  text-align: center;
  padding: 5px;
}

/* ---------------------------------
   Quiz / bloques
-----------------------------------*/
.quiz-head {
  text-align: center;
  margin-bottom: 6px;
}

/* ---------------------------------
   Pantalla final (thanks)
-----------------------------------*/
.thanks-title {
  font-family: 'Krub', sans-serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  margin: 0 0 10px;
  color: var(--text-soft);
  text-align: center;
}

.thanks-text {
  color: rgba(11,44,58,0.82);
  font-weight: 500;
  width: min(720px, 96%);
  margin: 6px auto 12px;
  line-height: 1.45;
  text-align: center;
}

.thanks-footer {
  color: #ff9f00;
  font-weight: 600;
  font-size: 0.98rem;
  width: min(720px, 96%);
  margin: 0 auto 12px;
  line-height: 1.4;
  text-align: center;
  /*background: rgba(255,255,255,0.65);*/
  background-color: white;
  border: 1px solid rgba(11,44,58,0.10);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.thanks-small {
  color: var(--text-soft);
  font-weight: 600;
  opacity: 0.98;
  font-size: 0.80rem;
  line-height: 1.45;
  width: min(760px, 98%);
  margin: 10px auto 0;
  text-align: center;
  /*background: rgba(255,255,255,0.55);*/
  background-color: white;
  border: 1px solid rgba(11,44,58,0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.thanks-small,
.thanks-footer {
  box-sizing: border-box;
  width: min(760px, 100%); /* o 100% directo */
}

.card { overflow-x: hidden; }
/* ---------------------------------
   Ajustes específicos por pantalla
-----------------------------------*/
.screen--hero .card--hero {
  /* background: rgba(255,255,255,0.80); */
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url("../assets/img/fondo1.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.card--wide .img-wide,
.card--wide2 .img-wide,
.card--wide3 .img-wide {
  margin: 0 auto 10px;
}

.screen--center .card--hero {
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url("../assets/img/fondo1.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.screen--center .card--wide2 {
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url("../assets/img/fondo1.png");
  background-size: cover;
  background-repeat: no-repeat;
    background-position:
    center center,
    center -220px;
}

.screen--center .card--wide3 {
  /*background-image:
    linear-gradient(0deg, rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url("../assets/img/fondo1.png");*/
  background-size: cover;
  background-repeat: no-repeat;
    background-position:
    center center,
    center -220px;
}

.screen--center .card--wide4 {
  /*background-image:
    linear-gradient(0deg, rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url("../assets/img/fondo1.png");*/
  background-size: cover;
  background-repeat: no-repeat;
    background-position:
    center center,
    center center;
}

.screen--center .card--wide5 {
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url("../assets/img/fondo1.png");
  background-size: cover;
  background-repeat: no-repeat;
    background-position:
    center center,
    center -100px;
}


/* ---------------------------------
   Focus accesible
-----------------------------------*/
.btn:focus-visible,
.btn-option:focus-visible {
  outline: 3px solid rgba(242,162,58,0.55);
  outline-offset: 3px;
}

/* ---------------------------------
   Animación suave de entrada
-----------------------------------*/
.screen.active .card {
  animation: cardIn .28s ease-out both;
}

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

/* ---------------------------------
   Responsive
-----------------------------------*/
@media (max-width: 860px) {
  .title-image {
    max-width: 480px;
    margin: 0 auto 14px;
    justify-content: center;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 10px !important;
  }

  .hero-content {
    text-align: center;
  }

  .img-principito,
  .img-principito2 {
    max-width: 90px;
  }

  .topbar {
    justify-content: center;
    padding: 6px 2px 4px !important;
  }

  .screen--center .card--wide2,
  .screen--center .card--wide3,
  .screen--center .card--wide4,
  .screen--center .card--wide5 {
    background-position:
    center;
  }

}

@media (max-width: 640px) {
  .title-image {
    max-width: 360px;
    margin-bottom: 12px;
  }

  .pages {
    padding: 18px 12px;
  }

  .card {
    padding: 18px;
  }

  .card--hero {
    padding: 18px;
  }

  .age-grid {
    grid-template-columns: 1fr;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }

  .btn-lg {
    width: 100%;
  }

  .btn-primary {
    width: 100%;
  }

  .footer-diagnosis {
    font-size: 0.82rem;
  }

  .result-image {
    width: min(200px, 70%);
  }
}

/* ---------------------------------
   Preferencia de reducción de movimiento
-----------------------------------*/
@media (prefers-reduced-motion: reduce) {
  .screen.active .card {
    animation: none;
  }

  .btn,
  .btn-option {
    transition: none;
  }

  .progress-bar {
    transition: none;
  }
}
