@import url("../../estilos.css");

/* Estilos propios de biblioteca/temas/ley-de-los-signos/juegos/guardia-de-los-signos/index.html. */

/* Reglas particulares extraídas del antiguo sistema visual. */
.eyebrow {
  display: block;
  margin: 0 0 1.3rem;
  color: var(--color-muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--color-text);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 820px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.65rem, 6.3vw, 5.9rem);
  font-weight: 900;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 850;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.section {
  padding-block: var(--space-section);
}



.status {
  display: inline-block;
  margin-bottom: 2.7rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-hero .lead {
  max-width: 780px;
}

@media (max-width: 640px) {

h1 { font-size: clamp(2.35rem, 13vw, 3.7rem); }

.hero-actions .button { width: 100%; }
}

.learning-site {
  --learning-blue: #1f5fbd;
  --learning-blue-dark: #164991;
  --learning-green: #15784e;
  --learning-red: #b43b3b;
}

.learning-site [hidden] {
  display: none !important;
}

.learning-hero,
.learning-page-hero {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  background: var(--color-background);
}

.learning-hero h1,
.learning-page-hero h1,
.exam-hero h1 {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.learning-hero .lead,
.learning-page-hero .lead {
  max-width: 820px;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  color: #3b3b37;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.6;
}

.learning-section-heading p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}



.lesson-heading h2,
.interactive-heading h2,
.calculator-heading h2,
.game-rule h2 {
  margin: 0;
  font-size: clamp(2.45rem, 5.8vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.learning-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.15rem;
  border: 1px solid var(--color-text);
  border-radius: var(--radius);
  background: var(--color-dark);
  color: var(--color-light);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.learning-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.learning-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.learning-button-primary {
  border-color: var(--learning-blue);
  background: var(--learning-blue);
}

.learning-button-primary:hover:not(:disabled) {
  background: var(--learning-blue-dark);
}

.learning-button-secondary {
  background: transparent;
  color: var(--color-text);
}

.learning-button-secondary:hover:not(:disabled) {
  background: var(--color-surface-strong);
}

.answer-feedback,
.form-message {
  min-height: 2.8rem;
  margin-top: 1.25rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.answer-feedback.is-correct {
  color: var(--learning-green);
}

.answer-feedback.is-incorrect,
.answer-feedback.is-error,
.form-message {
  color: var(--learning-red);
}

.answer-feedback .feedback-symbol {
  display: inline-grid;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 0.4rem;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  line-height: 1;
}





.result-sign,
.game-sign {
  display: grid;
  width: 58px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--color-light);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.result-sign.is-positive,
.game-sign.is-positive {
  background: var(--learning-green);
}

.result-sign.is-negative,
.game-sign.is-negative {
  background: var(--learning-red);
}

.game-section {
  padding: 0 0 clamp(4.5rem, 8vw, 7rem);
}

.game-rule {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(3rem, 6vw, 5rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--color-surface);
}

.game-rule > div {
  grid-row: span 2;
}

.game-rule h2 {
  font-size: clamp(1.9rem, 4vw, 3.3rem);
}

.game-rule > p {
  margin: 0;
  color: #3d3d39;
}

.game-equation {
  align-self: end;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 850;
}

.game-equation span {
  padding-inline: 0.25rem;
}

.game-board {
  border-block: 2px solid var(--color-text);
}

.game-statusbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.game-statusbar p {
  margin: 0;
  font-size: 0.92rem;
}

.game-statusbar p:last-child {
  color: var(--color-muted);
  text-align: right;
}

.game-scene {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: end;
  gap: clamp(0.75rem, 3vw, 2rem);
  min-height: 360px;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.game-character {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.game-character h3 {
  margin: 0;
  font-size: 1rem;
}

.game-sign {
  width: clamp(48px, 5vw, 62px);
}

.scene-operator {
  align-self: center;
  padding-bottom: 1.5rem;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 650;
}

.person-figure {
  position: relative;
  width: 100px;
  height: 160px;
}

.person-figure::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 45px;
  height: 45px;
  border: 4px solid var(--color-text);
  border-radius: 50%;
  transform: translateX(-50%);
  content: "";
}

.person-figure::after {
  position: absolute;
  top: 50px;
  left: 50%;
  width: 68px;
  height: 74px;
  border: 4px solid var(--color-text);
  border-radius: 34px 34px 5px 5px;
  transform: translateX(-50%);
  content: "";
}

.person-figure > span::before,
.person-figure > span::after {
  position: absolute;
  bottom: 0;
  width: 4px;
  height: 43px;
  background: var(--color-text);
  content: "";
}

.person-figure > span::before {
  left: 38px;
  transform: rotate(8deg);
}

.person-figure > span::after {
  right: 38px;
  transform: rotate(-8deg);
}

.guard-figure i {
  position: absolute;
  top: -7px;
  left: 50%;
  z-index: 1;
  width: 58px;
  height: 14px;
  transform: translateX(-50%);
  border: 3px solid var(--color-text);
  border-radius: 50% 50% 0 0;
  background: var(--color-background);
}

.guard-figure i::after {
  position: absolute;
  top: 61px;
  left: 37px;
  z-index: 1;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  border: 3px solid var(--color-text);
  background: var(--color-background);
  content: "";
}

.guard-figure::before {
  border-radius: 45% 45% 50% 50%;
}

.door-figure {
  position: relative;
  width: 105px;
  height: 160px;
  border: 5px solid var(--color-text);
  border-bottom: 0;
}

.door-figure::before {
  position: absolute;
  inset: 13px 12px 0;
  border: 3px solid var(--color-text);
  content: "";
}

.door-figure span {
  position: absolute;
  top: 52%;
  right: 19px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-text);
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}

.game-choice-buttons {
  display: flex;
  gap: 0.75rem;
}

.game-pass-button {
  border-color: var(--learning-green);
  background: var(--learning-green);
}

.game-deny-button {
  border-color: var(--learning-red);
  background: var(--learning-red);
}

.game-feedback {
  max-width: 850px;
  min-height: 3.2rem;
  margin: 0 auto;
  padding-bottom: 1.4rem;
}

@media (max-width: 900px) {

.fraction-introduction,
  .interactive-layout,
  .exam-hero-grid,
  .game-rule {
    grid-template-columns: 1fr;
  }

.game-rule > div {
    grid-row: auto;
  }

.game-scene {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

.scene-operator {
    display: none;
  }
}

@media (max-width: 640px) {
.learning-hero,
  .learning-page-hero,
  .exam-hero {
    padding: 3.5rem 0 4rem;
  }

.learning-hero h1,
  .learning-page-hero h1,
  .exam-hero h1 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

.sign-calculator > .learning-button {
    width: 100%;
  }

.game-statusbar {
    display: block;
    padding: 0.8rem 0;
  }

.game-statusbar p:last-child {
    margin-top: 0.25rem;
    text-align: left;
  }

.game-scene {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 285px;
    gap: 0.4rem;
  }

.person-figure {
    width: 72px;
    height: 125px;
    transform: scale(0.8);
    transform-origin: bottom center;
  }

.door-figure {
    width: 78px;
    height: 125px;
  }

.game-sign {
    width: 44px;
    font-size: 1.55rem;
  }

.game-character {
    gap: 0.55rem;
  }

.game-character h3 {
    font-size: 0.82rem;
  }

.game-choice-buttons {
    width: 100%;
  }

.game-choice-buttons .learning-button {
    flex: 1;
  }
}

@media (max-width: 640px) {

.task-board-toolbar,
  .task-board-toolbar .learning-button {
    width: 100%;
  }

.task-dialog-actions .learning-button {
    flex: 1;
  }
}

/* Componentes modulares utilizados por esta página. */
.module-site {
  --module-accent: var(--color-text);
}

.breadcrumbs {
  padding-top: 1.25rem;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: #a2a29b;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
.breadcrumbs {
    font-size: 0.78rem;
  }
}


/* Estilos que ya pertenecían a esta página. */
.sign-game-board .answer-feedback strong {
  display: block;
}

.sign-game-board .answer-feedback p {
  margin-bottom: 0;
}

.sign-game-board .game-controls {
  gap: 0.8rem;
}
