/* Identidad Preguntas PER */
:root {
  --navy: #062f52;
  --navy-2: #08476a;
  --teal: #078cab;
  --mint: #bfeaf1;
  --cream: #f6f9f8;
  --coral: #ff5d38;
  --yellow: #f6cf65;
  --ink: #153a50;
  --muted: #647d88;
  --line: #d8e6e9;
}

.topbar {
  background: rgba(246, 249, 248, .94);
  height: 96px;
}

.brand-logo {
  display: block;
  width: 300px;
  height: 69px;
  object-fit: contain;
  object-position: left center;
}

.hero-visual {
  background: #e9f3f3;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.footer-brand span {
  color: white;
  font: 700 17px Manrope;
}

.site-footer {
  display: block;
  min-height: 0;
  padding: 55px 7vw 0;
  text-align: left;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 5vw;
  max-width: 1220px;
  margin: auto;
  padding-bottom: 45px;
}

.footer-intro > p {
  color: white;
  font: 700 17px Manrope;
  margin: 22px 0 5px;
}

.footer-intro > small {
  display: block;
  max-width: 250px;
  color: #7f9aa6;
  font-size: 11px;
  line-height: 1.55;
}

.footer-column strong {
  display: block;
  color: white;
  font: 700 13px Manrope;
  margin-bottom: 14px;
}

.footer-column a {
  display: block;
  width: max-content;
  max-width: 100%;
  color: #91aaac;
  text-decoration: none;
  font-size: 11px;
  padding: 5px 0;
}

.footer-column a:hover {
  color: var(--mint);
}

.footer-bottom {
  max-width: 1220px;
  margin: auto;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 19px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #6f8b96;
  font-size: 10px;
}

.modal-brand-icon {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .brand-logo {
    width: 218px;
    height: 50px;
  }

  .topbar {
    height: 78px;
  }
}

@media (max-width: 850px) {
  .site-footer {
    align-items: initial;
    padding: 45px 24px 0;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 35px 25px;
  }
}

@media (max-width: 520px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* Ilustraciones de producto */
.product-story {
  padding: 105px 8vw 120px;
  background: var(--cream);
}

.story-row {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 7vw;
  align-items: center;
}

.story-row + .story-row {
  margin-top: 100px;
}

.story-row.reverse .story-image {
  order: 2;
}

.story-image {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(6, 47, 82, .13);
  background: #f8f3e9;
}

.story-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.story-copy h2 {
  font: 800 clamp(34px, 4vw, 50px)/1.08 Manrope;
  letter-spacing: -.035em;
  color: var(--navy);
  margin: 13px 0 20px;
}

.story-copy > p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.story-copy ul {
  list-style: none;
  padding: 0;
  margin: 25px 0 30px;
  display: grid;
  gap: 12px;
}

.story-copy li {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.story-copy li::before {
  content: "✓";
  color: var(--coral);
  font-weight: 900;
  margin-right: 11px;
}

@media (max-width: 850px) {
  .story-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-row.reverse .story-image {
    order: 0;
  }
}

@media (max-width: 600px) {
  .product-story {
    padding: 75px 20px 85px;
  }

  .story-row + .story-row {
    margin-top: 75px;
  }

  .story-image {
    border-radius: 16px;
  }
}

/* Guía pública del examen PER */
.per-guide {
  padding: 105px 7vw 115px;
  background: #eef7f8;
}

.guide-intro {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 8vw;
  align-items: end;
  max-width: 1180px;
  margin: 0 auto 45px;
}

.guide-intro h2,
.guide-faq h2 {
  font: 800 clamp(34px, 4.6vw, 58px)/1.08 Manrope;
  letter-spacing: -.035em;
  color: var(--navy);
  margin: 12px 0 0;
}

.guide-intro > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

.exam-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1180px;
  margin: auto;
  background: var(--navy);
  color: white;
  border-radius: 16px;
  overflow: hidden;
}

.exam-facts article {
  padding: 27px 23px;
  display: flex;
  gap: 15px;
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, .12);
}

.exam-facts article:last-child {
  border-right: 0;
}

.fact-icon {
  flex: 0 0 53px;
  height: 53px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  font: 800 16px Manrope;
}

.exam-facts strong,
.exam-facts p {
  display: block;
}

.exam-facts strong {
  font: 700 14px Manrope;
}

.exam-facts p {
  color: #a9c4d0;
  font-size: 11px;
  line-height: 1.45;
  margin: 5px 0 0;
}

.exam-structure {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 6vw;
  max-width: 1180px;
  margin: 80px auto 0;
  align-items: center;
}

.structure-copy h3 {
  font: 800 35px/1.15 Manrope;
  color: var(--navy);
  margin: 12px 0 18px;
}

.structure-copy > p {
  color: var(--muted);
  line-height: 1.7;
}

.critical-note {
  display: flex;
  gap: 13px;
  background: #fff;
  border-left: 4px solid var(--coral);
  border-radius: 8px;
  padding: 16px;
  margin-top: 25px;
}

.critical-note > span {
  flex: 0 0 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: white;
  font-weight: 800;
}

.critical-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.exam-table-wrap {
  overflow: hidden;
  border-radius: 13px;
  box-shadow: 0 14px 45px rgba(6, 47, 82, .1);
}

.exam-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

.exam-table th {
  background: var(--navy);
  color: white;
  text-align: left;
  padding: 15px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.exam-table th:nth-child(n+3),
.exam-table td:nth-child(n+3) {
  text-align: center;
}

.exam-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.exam-table td:first-child {
  color: var(--teal);
  font-weight: 800;
}

.exam-table .critical {
  background: #fff5f1;
}

.exam-table .critical td:last-child {
  color: var(--coral);
  font-weight: 800;
}

.exam-table tfoot td {
  background: #dff2f5;
  color: var(--navy) !important;
  font-weight: 800;
  border-bottom: 0;
}

.correction-guide {
  max-width: 1180px;
  margin: 90px auto 0;
}

.correction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.correction-grid article {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border-top: 3px solid var(--teal);
}

.correction-grid article > span {
  color: var(--coral);
  font: 800 11px Manrope;
}

.correction-grid h3 {
  color: var(--navy);
  font: 700 16px Manrope;
  margin: 13px 0 8px;
}

.correction-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}

.guide-faq {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 8vw;
  max-width: 1180px;
  margin: 95px auto 0;
}

.guide-faq h2 {
  font-size: 38px;
}

.faq-list details {
  border-bottom: 1px solid #c8dadd;
  padding: 17px 0;
}

.faq-list summary {
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  padding-right: 30px;
  position: relative;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  color: var(--teal);
  font-size: 20px;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  padding-right: 30px;
}

.guide-cta {
  max-width: 1180px;
  margin: 80px auto 0;
  padding: 32px 38px;
  border-radius: 14px;
  background: linear-gradient(110deg, var(--navy), #095b79);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.guide-cta .eyebrow {
  color: var(--mint);
}

.guide-cta h3 {
  font: 700 23px Manrope;
  margin: 7px 0 0;
}

.guide-cta .button {
  background: white;
  color: var(--navy);
  white-space: nowrap;
}

.reveal-answer {
  border: 0;
  background: transparent;
  color: var(--teal);
  font: 800 13px "DM Sans";
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  margin-top: 18px;
  padding: 0;
}

.answer.correct {
  border-color: #15966f;
  background: #e2f6ed;
  color: #0c684f;
}

.answer.incorrect {
  border-color: var(--coral);
  background: #fff0eb;
  color: #a43f28;
}

.answer-feedback {
  background: #e9f6f8;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 15px 18px;
  margin-top: 18px;
}

.answer-feedback strong {
  color: var(--navy);
}

.answer-feedback p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 6px 0 0;
}

@media (max-width: 900px) {
  .guide-intro,
  .exam-structure,
  .guide-faq {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .exam-facts,
  .correction-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .per-guide {
    padding: 75px 20px;
  }

  .exam-facts,
  .correction-grid {
    grid-template-columns: 1fr;
  }

  .exam-facts article {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }

  .exam-table {
    font-size: 11px;
  }

  .exam-table th,
  .exam-table td {
    padding: 10px 7px;
  }

  .guide-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 27px 23px;
  }
}

/* Banco completo y acceso de desarrollo */
.exam-card {
  transition: .2s;
}

.exam-card:not(.locked) {
  cursor: pointer;
}

.exam-card:not(.locked):hover {
  transform: translateY(-4px);
  border-color: var(--mint);
  box-shadow: 0 14px 35px rgba(9, 45, 53, .1);
}

.exam-card h3 {
  padding-right: 24px;
}

.question-figure {
  display: block;
  max-width: 100%;
  max-height: 310px;
  object-fit: contain;
  margin: 0 auto 25px;
  border-radius: 8px;
}

.question-figures {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0 auto 25px;
}

.question-figures .question-figure {
  margin: 0;
}

.question-figures.fragment-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 100%;
  overflow-x: auto;
}

.fragment-strip .question-figure {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  border-radius: 0;
}

.fragment-strip .question-figure:first-child {
  border-radius: 8px 0 0 8px;
}

.fragment-strip .question-figure:last-child {
  border-radius: 0 8px 8px 0;
}

.preview-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.paypal-hosted-form {
  display: block;
  text-align: center;
}

.paypal-hosted-form .paypal-buy-button {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.preview-divider::before,
.preview-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.study-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.tool-card {
  background: white;
  border: 1px solid white;
  border-radius: 14px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 8px 26px rgba(9, 45, 53, .06);
}

.tool-card.official {
  background: var(--navy);
  color: white;
}

.tool-card.official h3,
.tool-card.official .eyebrow {
  color: white;
}

.tool-card.official p {
  color: #afc4c5;
}

.tool-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--navy);
  font-size: 19px;
  margin-bottom: 21px;
}

.tool-card h3 {
  font: 700 19px Manrope;
  color: var(--navy);
  margin: 8px 0;
}

.tool-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 40px;
  margin: 0 0 22px;
}

.tool-card .button {
  margin-top: auto;
}

.official-rules {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 20px 25px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.official-rules h3 {
  font: 700 18px Manrope;
  margin: 5px 0 0;
}

.official-rules > div:not(:first-child) {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.official-rules strong,
.official-rules span {
  display: block;
}

.official-rules strong {
  font: 800 23px Manrope;
  color: var(--teal);
}

.official-rules > div:not(:first-child) span {
  color: var(--muted);
  font-size: 10px;
}

.custom-test-modal {
  width: min(680px, calc(100% - 28px));
  max-height: 88vh;
}

.custom-theme-fields {
  max-height: 48vh;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding-right: 5px;
}

.theme-field {
  display: grid;
  grid-template-columns: 36px 1fr 74px;
  align-items: center;
  gap: 11px;
  background: white;
  padding: 9px 12px;
  border-radius: 9px;
}

.theme-field > span:first-child {
  color: var(--teal);
  font-weight: 800;
}

.theme-field label {
  font-size: 13px;
  font-weight: 600;
}

.theme-field input {
  width: 70px;
  padding: 8px;
  text-align: center;
}

.custom-total {
  display: flex;
  justify-content: space-between;
  padding: 15px 0 2px;
  color: var(--muted);
}

.custom-total strong {
  color: var(--navy);
}

.result-status {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 99px;
  background: #e4f4ed;
  color: var(--teal);
  font-weight: 800;
  margin-bottom: 12px;
}

.result-status.failed {
  background: #fff0ec;
  color: #bf4936;
}

.criteria-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.criteria-results div {
  background: var(--cream);
  border-radius: 8px;
  padding: 12px 7px;
}

.criteria-results strong,
.criteria-results span {
  display: block;
}

.criteria-results span {
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 850px) {
  .study-tools,
  .official-rules,
  .criteria-results {
    grid-template-columns: 1fr;
  }

  .official-rules > div:not(:first-child) {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 10px 0 0;
  }
}
