/* ==========================================================================
   COMPTEXT 2026 — Base IC2S2 adaptada
   Referencia: styles.css de rcantillan/slides (IC2S2)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;600;700&display=swap");

.reveal {
  --r-background-color: #f7f9fc;
  --r-main-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-heading-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-main-color: #1f2937;
  --r-heading-color: #5431b2;
  --r-link-color: #315fbe;
  --r-link-color-hover: #24498f;
  --r-selection-background-color: #d8e4ff;
  --r-selection-color: #1e3a6d;
  --r-main-font-size: 30px;
  line-height: 1.2;
}

.reveal-viewport,
html,
body {
  background: #ffffff !important;
  background-image: none !important;
}

.reveal .slides {
  background: #ffffff !important;
}

/* Host logos: BIRMI + COMPTEXT — fixed above slides (see deck-logos.html) */
.reveal .deck-host-logos {
  position: fixed;
  top: max(0.2rem, env(safe-area-inset-top, 0px));
  left: max(0.35rem, env(safe-area-inset-left, 0px));
  z-index: 42;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1.05rem;
  padding: 0.28rem 0.6rem;
  pointer-events: none;
  line-height: 0;
}

.reveal .deck-host-logos img {
  height: clamp(2rem, 4.85vh, 2.9rem);
  width: auto;
  max-width: min(57vw, 16.5rem);
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* BIRMI (first) larger than COMPTEXT */
.reveal .deck-host-logos img:first-child {
  height: clamp(2.55rem, 6.15vh, 3.65rem);
  max-width: min(64vw, 20.6rem);
}

/* Toggle in deck-logos.html: centerLogos = true */
.reveal .deck-host-logos.deck-host-logos--center {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  justify-content: center;
}

.reveal .slides section {
  text-align: left;
  background: transparent !important;
  box-shadow: none !important;
}

/* Fuerza títulos arriba en slides normales */
.reveal .slides section:not(#title-slide) {
  padding-top: 0.15em;
}

.reveal .slides section:not(#title-slide) h2 {
  margin-top: 0 !important;
}

/* Evitar clipping de encabezados en slides normales */
.reveal .slides section:not(#title-slide) {
  overflow: visible !important;
}

/* Portada */
#title-slide.quarto-title-block {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: #ffffff !important;
  border-top: 0;
  text-align: left !important;
}

#title-slide.quarto-title-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background-image: url("image/america-latam.jpg");
  background-size: contain;
  background-position: left center;
  background-color: #ffffff;
  background-repeat: no-repeat;
  z-index: 0;
}

#title-slide.quarto-title-block::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #e3e9f2;
  z-index: 1;
}

#title-slide.quarto-title-block > * {
  position: relative;
  z-index: 2;
  margin-left: 50%;
  width: calc(50% - 2.25em);
  text-align: center !important;
  padding-left: 1.15em;
  padding-right: 1.1em;
  box-sizing: border-box;
}

#title-slide h1 {
  color: #2f2a85;
  font-size: 1.34em;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-top: 3em;
  margin-bottom: 0.14em;
  font-weight: 700;
  text-shadow: none;
  text-align: center !important;
}

#title-slide .subtitle,
#title-slide h2 {
  font-family: var(--r-main-font);
  color: #475970;
  font-size: 0.68em;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 0.1em;
  line-height: 1.25;
  text-align: center !important;
}

#title-slide .quarto-title-authors {
  position: absolute;
  left: 50%;
  bottom: 2.5em;
  width: 50%;
  margin: 0;
  padding-left: 1.15em;
  padding-right: 1.1em;
  text-align: center !important;
}

#title-slide .quarto-title-author-name {
  color: #5a6a82;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: block;
}

#title-slide .quarto-title-author-name::after {
  content: "";
  display: block;
  color: #1f2937;
  font-size: 0.75em;
  font-weight: 400;
  font-style: italic;
  margin-top: 0.3em;
  white-space: pre-line;
  line-height: 1.5;
}

#title-slide .quarto-title-authors::after {
  content: "8th Annual COMPTEXT Conference 2026";
  display: block;
  color: #ffffff;
  background: #5431b2;
  font-size: 0.38em;
  font-weight: 500;
  margin-top: 0.8em;
  padding: 0.4em 1em;
  border-radius: 3px;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#title-slide .date {
  display: none;
}

/* Jerarquía tipográfica compacta */
.reveal h2 {
  color: #5431b2;
  font-size: 1.12em;
  line-height: 1.16;
  margin: 0 0 0.36em 0;
  padding-bottom: 0.12em;
  border-bottom: 1px solid #d8deef;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.reveal h3 {
  font-family: var(--r-main-font);
  font-size: 0.74em;
  color: #304866;
  font-weight: 600;
  margin: 0.24em 0 0.14em;
}

.reveal p,
.reveal li {
  color: var(--r-main-color);
  font-size: 0.78em;
  line-height: 1.28;
}

.reveal p {
  margin: 0.16em 0 0.26em;
}

.reveal ul,
.reveal ol {
  margin: 0.12em 0 0.18em 0.82em;
}

.reveal li {
  margin-bottom: 0.14em;
}

/* Código */
.reveal pre {
  background: #f8fbff !important;
  border: 1px solid #dde6f2;
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.52em;
  line-height: 1.22;
}

.reveal code {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  background: #f1f6fd;
  color: #163d73;
  border-radius: 4px;
  padding: 0.1em 0.32em;
  font-size: 0.76em;
}

.reveal pre code {
  background: transparent;
  color: #334155;
  padding: 0;
}

/* Figuras */
.reveal figure img,
.reveal .slide-content .cell-output-display img {
  border: 1px solid #d6deea;
  border-radius: 6px;
  box-shadow: 0 3px 14px rgba(16, 35, 61, 0.08);
}

.reveal figcaption,
.reveal .figure-caption {
  color: #4d6078;
  font-size: 0.5em;
  margin-top: 0.25em;
}

/* Tablas */
.reveal table {
  border-collapse: collapse;
  font-size: 0.53em;
}

.reveal th {
  background: #ebeff8;
  color: #3d2b83;
  border: 1px solid #c9d6e8;
  font-weight: 600;
  padding: 0.26em 0.46em;
}

.reveal td {
  border: 1px solid #d4deec;
  color: #1f2a37;
  padding: 0.22em 0.44em;
}

.reveal tr:nth-child(even) {
  background: #f1f5fb;
}

/*
 * Hypotheses overview: custom.scss sets .reveal .slides table { display:block;
 * white-space:nowrap; overflow-x:auto } — that breaks wrapping. Restore real
 * table layout here so cells wrap to new lines when needed.
 */
.reveal section#hypotheses-overview.slide.level2 > h2 {
  max-width: 88%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.4em;
  font-size: 0.95em;
  text-align: left;
  box-sizing: border-box;
}

.reveal .hypotheses-overview-wrap {
  max-width: 88%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  overflow-x: visible;
}

.reveal .hypotheses-overview-wrap table {
  display: table !important;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  font-size: 0.78em;
  line-height: 1.34;
  white-space: normal !important;
  overflow-x: visible !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.reveal .hypotheses-overview-wrap colgroup col:nth-child(1) {
  width: 11% !important;
}

.reveal .hypotheses-overview-wrap colgroup col:nth-child(2) {
  width: 41% !important;
}

.reveal .hypotheses-overview-wrap colgroup col:nth-child(3) {
  width: 48% !important;
}

.reveal .hypotheses-overview-wrap table th:nth-child(1),
.reveal .hypotheses-overview-wrap table td:nth-child(1) {
  width: 11%;
}

.reveal .hypotheses-overview-wrap table th:nth-child(2),
.reveal .hypotheses-overview-wrap table td:nth-child(2) {
  width: 41%;
}

.reveal .hypotheses-overview-wrap table th:nth-child(3),
.reveal .hypotheses-overview-wrap table td:nth-child(3) {
  width: 48%;
}

.reveal .hypotheses-overview-wrap table th,
.reveal .hypotheses-overview-wrap table td {
  padding: 0.36em 0.45em;
  vertical-align: top;
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Layout — two-column slides (Quarto .columns → side by side in Reveal) */
.reveal .slides section > .columns {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 0.5rem;
  box-sizing: border-box;
}

.reveal .slides section > .columns > .column {
  flex: 1 1 48% !important;
  width: 48% !important;
  max-width: 50% !important;
  float: none !important;
  box-sizing: border-box;
}

.reveal .columns .column {
  padding-right: 0.58em;
}

/* Data & Pipeline: two stacked column rows inside one slide */
.reveal .data-pipeline-slide {
  font-size: 0.9em;
  line-height: 1.22;
}

.reveal .data-pipeline-slide > .columns {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 0.5rem;
  box-sizing: border-box;
}

.reveal .data-pipeline-slide > .columns + .columns {
  margin-top: 0.55em;
  padding-top: 0.5em;
  border-top: 1px solid rgba(84, 49, 178, 0.12);
}

.reveal .data-pipeline-slide > .columns > .column {
  flex: 1 1 48% !important;
  width: 48% !important;
  max-width: 50% !important;
  float: none !important;
  box-sizing: border-box;
}

.reveal .data-pipeline-slide > .columns.data-pipeline-bottom > .column:nth-child(1) {
  flex: 1 1 56% !important;
  width: 56% !important;
  max-width: 58% !important;
}

.reveal .data-pipeline-slide > .columns.data-pipeline-bottom > .column:nth-child(2) {
  flex: 1 1 42% !important;
  width: 42% !important;
  max-width: 45% !important;
}

.reveal .data-pipeline-slide h4 {
  margin: 0 0 0.28em 0;
  font-size: 0.82em;
  font-weight: 700;
  color: #5431b2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.reveal .data-pipeline-slide .box-primary {
  margin-top: 0;
}

/* Two-stage methodology cards */
.reveal .pipeline-stages {
  display: flex;
  align-items: stretch;
  gap: 1em;
  margin: 1.2em 0;
}

.reveal .stage-card {
  flex: 1;
  background: #f7f9fc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3b5b8a;
  border-radius: 8px;
  padding: 1.2em 1.4em;
  position: relative;
}

.reveal .stage-card-highlight {
  border-left-color: #b8651a;
  background: #fef9f3;
}

.reveal .stage-badge {
  display: inline-block;
  background: #3b5b8a;
  color: #ffffff;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.6em;
  text-transform: uppercase;
}

.reveal .stage-card-highlight .stage-badge {
  background: #b8651a;
}

.reveal .stage-card h4 {
  margin: 0.2em 0 0.5em 0;
  font-size: 1.1em;
  color: #1a2b4a;
}

.reveal .stage-methods {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75em;
  color: #60748e;
  margin: 0.7em 0;
  padding: 0.4em 0.6em;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
}

.reveal .stage-arrow {
  display: flex;
  align-items: center;
  font-size: 2em;
  color: #60748e;
  font-weight: 300;
}

/* Footer y navegación */
.reveal .slide-number {
  color: #315d93 !important;
  font-size: 0.42em;
  opacity: 0.85;
}

.reveal .footer {
  color: #60748e;
  font-size: 0.42em;
}

.reveal a {
  color: var(--r-link-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(49, 95, 190, 0.35);
}

.reveal a:hover {
  color: var(--r-link-color-hover);
  border-bottom-color: rgba(36, 73, 143, 0.55);
}

/* --- Portada final limpia --- */
#title-slide h1 {
  margin-top: 5.2em !important;
  text-align: center !important;
  font-size: 1.14em;
}

#title-slide .subtitle,
#title-slide h2 {
  text-align: center !important;
}

#title-slide .date {
  display: none !important;
}

#title-slide .quarto-title-authors {
  position: absolute;
  left: 50%;
  bottom: 2em;
  width: 50%;
  padding-left: 1.15em;
  padding-right: 1.1em;
  text-align: center !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#title-slide .quarto-title-author-name::after {
  content: ;
  display: block;
  color: #1f2937;
  font-size: 0.75em;
  font-weight: 400;
  font-style: italic;
  margin-top: 0.3em;
  white-space: pre-line;
  line-height: 1.5;
}

#title-slide .quarto-title-authors::after {
  content: none;
}

/* Slides normales — reseteo explícito */
.reveal .slides section:not(#title-slide):not(#thank-you-slide) h2 {
  margin-top: 0 !important;
  padding-top: 0 !important;
  text-align: left !important;
  font-size: 1.12em !important;
}

/* Thank You Slide - mirror of title slide */
#thank-you-slide {
  position: relative !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: #ffffff !important;
}

#thank-you-slide h2 {
  display: none !important;
}

/* Image on the RIGHT side via ::after */
#thank-you-slide::after {
  content: "" !important;
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 50% !important;
  background-image: url("image/america-latam.jpg") !important;
  background-size: contain !important;
  background-position: right center !important;
  background-color: #ffffff !important;
  background-repeat: no-repeat !important;
  z-index: 0 !important;
}

/* Vertical line separator */
#thank-you-slide::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 1px !important;
  background: #e3e9f2 !important;
  z-index: 1 !important;
}

#thank-you-slide .thank-you-content {
  position: relative !important;
  z-index: 2 !important;
  width: 50% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  padding: 1em !important;
  box-sizing: border-box !important;
}

#thank-you-slide .thank-you-content h3 {
  color: #5431b2 !important;
  font-size: 1.6em !important;
  margin-bottom: 0.5em !important;
  font-weight: 700 !important;
  margin-top: 0 !important;
  border-bottom: none !important;
}

#thank-you-slide .thank-you-content p {
  font-size: 0.7em !important;
  margin: 0.15em 0 !important;
  text-align: center !important;
}

#thank-you-slide .thank-you-content p strong {
  color: #2f2a85 !important;
  font-size: 1.1em !important;
}

#thank-you-slide .thank-you-content p em {
  color: #1f2937 !important;
  font-style: italic !important;
}

#thank-you-slide .thank-you-content .email-link,
#thank-you-slide .thank-you-content .github-link {
  display: block !important;
  color: #315fbe !important;
  font-size: 0.6em !important;
  margin: 0.3em 0 !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

#thank-you-slide .thank-you-content .github-link {
  margin-top: 0.2em !important;
}

/* Progressive image collage after Motivation */
.reveal .slides section[class*="montage-step-"] h2 {
  margin-bottom: 0.28em !important;
}

.reveal .montage-frame {
  position: relative;
  width: min(92%, 980px);
  height: 78%;
  margin: 0.4em auto 0;
}

.reveal .montage-frame p {
  margin: 0;
}

.reveal .montage-img {
  position: absolute;
  border: 1px solid #d8deef;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(17, 33, 64, 0.18);
  object-fit: cover;
  background: #fff;
  opacity: 0;
  transition: opacity 220ms ease-in-out;
}

.reveal .montage-img-1 {
  left: 8%;
  top: 9%;
  width: 40%;
  transform: rotate(-4deg);
}

.reveal .montage-img-2 {
  right: 7%;
  top: 7%;
  width: 42%;
  transform: rotate(3deg);
}

.reveal .montage-img-3 {
  left: 18%;
  top: 32%;
  width: 36%;
  transform: rotate(-2deg);
}

.reveal .montage-img-4 {
  right: 16%;
  top: 33%;
  width: 37%;
  transform: rotate(4deg);
}

.reveal .montage-img-5 {
  left: 30%;
  top: 44%;
  width: 50%;
  transform: rotate(-1deg);
  z-index: 9;
  box-shadow: 0 14px 34px rgba(10, 22, 46, 0.34);
}

.reveal .montage-step-1 .montage-img-1 { opacity: 0.86; }
.reveal .montage-step-2 .montage-img-1,
.reveal .montage-step-2 .montage-img-2 { opacity: 0.74; }
.reveal .montage-step-3 .montage-img-1,
.reveal .montage-step-3 .montage-img-2,
.reveal .montage-step-3 .montage-img-3 { opacity: 0.66; }
.reveal .montage-step-4 .montage-img-1,
.reveal .montage-step-4 .montage-img-2,
.reveal .montage-step-4 .montage-img-3,
.reveal .montage-step-4 .montage-img-4 { opacity: 0.58; }
.reveal .montage-step-5 .montage-img-1,
.reveal .montage-step-5 .montage-img-2,
.reveal .montage-step-5 .montage-img-3,
.reveal .montage-step-5 .montage-img-4,
.reveal .montage-step-5 .montage-img-1,
.reveal .montage-step-5 .montage-img-2,
.reveal .montage-step-5 .montage-img-3,
.reveal .montage-step-5 .montage-img-4 { opacity: 0.28; }
.reveal .montage-step-5 .montage-img-5 { opacity: 0.95; }

