/* ==========================================================================
   UNCAUS - Presentación Interactiva UVi & Folletería Digital
   Diseño Ultra-Responsive: Pantallas de TV (4K/1080p), Notebooks, Tablets y Totems
   ========================================================================== */

:root {
  /* Paleta Institucional UNCAUS */
  --uncaus-blue: #0b233a;
  --uncaus-blue-dark: #061524;
  --uncaus-blue-light: #163e63;
  --uncaus-green: #008f4c;
  --uncaus-green-bright: #00ba63;
  --uncaus-green-soft: #e6f6ee;
  --uncaus-accent: #00b4d8;
  --uncaus-gold: #f59e0b;

  /* Neutros y Superficies */
  --bg-gradient: radial-gradient(circle at 10% 20%, #0d2742 0%, #061626 90%);
  --surface: rgba(255, 255, 255, 0.95);
  --surface-glass: rgba(255, 255, 255, 0.88);
  --surface-border: rgba(255, 255, 255, 0.25);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;

  /* Sombras y Elevación */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  --shadow-glow-green: 0 0 30px rgba(0, 186, 99, 0.4);

  /* Curvaturas */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Tipografías Fluidas */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transiciones */
  --transition-normal: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Reset y base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  /* En desktop/TV sin scroll; si el alto no alcanza se activa scroll suave */
  overflow-y: auto;
}

/* Scrollbar estilizada */
body::-webkit-scrollbar {
  width: 8px;
}
body::-webkit-scrollbar-track {
  background: rgba(6, 21, 36, 0.6);
}
body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--uncaus-green-bright);
}

/* Fondos dinámicos decorativos */
.bg-ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  top: -10%;
  left: -5%;
  width: min(500px, 45vw);
  height: min(500px, 45vw);
  background: radial-gradient(circle, var(--uncaus-green) 0%, transparent 70%);
}

.orb-2 {
  bottom: -15%;
  right: -5%;
  width: min(600px, 50vw);
  height: min(600px, 50vw);
  background: radial-gradient(circle, var(--uncaus-accent) 0%, transparent 70%);
  animation-duration: 22s;
  animation-direction: alternate-reverse;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 20px) scale(1.05); }
  100% { transform: translate(-25px, -15px) scale(0.95); }
}

/* ==========================================================================
   Header Superior de Presentación (Adaptable a Notebooks y Tablets)
   ========================================================================== */
.main-header {
  position: relative;
  z-index: 20;
  padding: clamp(0.5rem, 1.2vh, 0.9rem) clamp(1rem, 2.5vw, 2.2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(11, 35, 58, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.5vw, 1rem);
  min-width: 0;
}

.brand-logo-card {
  background: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.9);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.brand-logo-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.header-logo-img {
  height: clamp(30px, 4.2vh, 42px);
  width: auto;
  max-width: 180px;
  display: block;
  object-fit: contain;
}

.header-tag-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  font-size: clamp(0.72rem, 1.4vh, 0.82rem);
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Panel de Control & Switch de Modos
   ========================================================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
  flex-shrink: 0;
}

/* Switch estilizado de modo */
.mode-toggle-card {
  display: inline-flex;
  align-items: center;
  background: rgba(6, 21, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.35rem;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.mode-option-btn {
  background: transparent;
  border: none;
  padding: clamp(0.35rem, 1vh, 0.55rem) clamp(0.75rem, 1.5vw, 1.15rem);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.5vh, 0.85rem);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  z-index: 2;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.mode-option-btn .icon {
  font-size: clamp(0.85rem, 1.8vh, 1.05rem);
}

.mode-option-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--uncaus-green) 0%, var(--uncaus-green-bright) 100%);
  box-shadow: 0 2px 10px rgba(0, 186, 99, 0.45);
}

.mode-keyboard-tip {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.mode-keyboard-tip kbd {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.72rem;
}

.action-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: clamp(34px, 4vh, 40px);
  height: clamp(34px, 4vh, 40px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

/* ==========================================================================
   Área Principal de la Presentación (Stage Flexible y Centrado)
   ========================================================================== */
.presentation-viewport {
  flex: 1;
  position: relative;
  z-index: 10;
  /* Margen horizontal generoso para que nunca se pegue a los bordes de la pantalla */
  padding: clamp(0.75rem, 2vh, 1.8rem) clamp(2rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.presentation-stage {
  width: 100%;
  max-width: 1280px;
  display: grid;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
  margin: auto;
}

/* ==========================================================================
   MODO 1: "Con folletos" (Foco protagónico en UVi y Chatbot)
   ========================================================================== */
body.view-with-brochures .presentation-viewport,
.presentation-viewport:has(.mode-with-brochures) {
  padding-top: clamp(6px, 1.2vh, 12px);
  padding-bottom: clamp(14px, 2.2vh, 22px);
  overflow: hidden;
}

.presentation-stage.mode-with-brochures {
  grid-template-columns: 1fr;
  max-width: min(1440px, 95vw);
  height: auto;
  max-height: 100%;
}

.presentation-stage.mode-with-brochures .brochures-panel {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.presentation-stage.mode-with-brochures .tatu-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  width: 100%;
  height: auto;
}

.presentation-stage.mode-with-brochures .tatu-content {
  text-align: left;
  align-items: flex-start;
  max-width: 500px;
}

/* Tamaño de UVi en Modo con folletos: se calcula en base al alto disponible para no cortarse jamás */
.presentation-stage.mode-with-brochures .tatu-stage-wrapper {
  height: clamp(260px, calc(100vh - 145px), 640px) !important;
  width: clamp(260px, calc(100vh - 145px), 640px) !important;
  max-width: min(50vw, calc(100vh - 145px)) !important;
  max-height: calc(100vh - 145px) !important;
  aspect-ratio: 1 / 1 !important;
}

/* ==========================================================================
   MODO 2: "Sin folletos" (Pantalla Dividida UVi + 2 Folletos Equilibrados)
   ========================================================================== */
.presentation-stage.mode-without-brochures {
  grid-template-columns: 46% 54%;
  gap: clamp(1.5rem, 3vw, 3rem);
  max-width: 1360px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.presentation-stage.mode-without-brochures .brochures-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vh, 1.4rem);
  width: 100%;
  max-width: 660px;
  justify-self: center;
  opacity: 1;
  pointer-events: auto;
  animation: fadeInRight 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.presentation-stage.mode-without-brochures .tatu-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
  max-width: 500px;
  gap: clamp(0.75rem, 1.5vh, 1.25rem);
  transition: var(--transition-normal);
}

.presentation-stage.mode-without-brochures .tatu-stage-wrapper {
  width: clamp(280px, min(56vh, 38vw), 500px);
  height: clamp(280px, min(56vh, 38vw), 500px);
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ==========================================================================
   Componente: Tarjeta / Panel de UVi(Asistente de UNCAUS Virtual)
   ========================================================================== */
.tatu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.presentation-stage.mode-with-brochures .tatu-content {
  text-align: left;
  align-items: flex-start;
  max-width: 540px;
}

.tatu-badge-intro {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 186, 99, 0.16);
  border: 1px solid rgba(0, 186, 99, 0.45);
  color: var(--uncaus-green-bright);
  font-size: clamp(0.72rem, 1.3vh, 0.85rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 186, 99, 0.2);
}

.tatu-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.8vh, 2.7rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.tatu-subtitle {
  color: #cbd5e1;
  font-size: clamp(0.85rem, 1.8vh, 1.1rem);
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* Ajustes de UVien modo "Sin folletos" */
.presentation-stage.mode-without-brochures .tatu-content {
  text-align: center;
  align-items: center;
  max-width: 420px;
}
.presentation-stage.mode-without-brochures .tatu-title {
  font-size: clamp(1.3rem, 2.6vh, 1.9rem);
}
.presentation-stage.mode-without-brochures .tatu-subtitle {
  font-size: clamp(0.78rem, 1.5vh, 0.95rem);
  margin-bottom: 0.5rem;
}

/* Contenedor Ultra-Fluid del Personaje UViy la Tablet */
.tatu-stage-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
  flex-shrink: 0;
}

/* (Reglas de tamaño definidas por modo arriba) */

/* Imagen base de UVi*/
.tatu-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
  user-select: none;
  -webkit-user-drag: none;
  animation: tatuBreath 5s ease-in-out infinite alternate;
}

@keyframes tatuBreath {
  0% { transform: translateY(0); }
  100% { transform: translateY(-7px); }
}

/* ==========================================================================
   Tablet Screen & QR Code Interactive Area
   El código QR está integrado directamente en la ilustración de UVi.
   Este contenedor actúa como área interactiva transparente para abrir el modal zoom al tocar o hacer clic.
   ========================================================================== */
.tablet-screen-overlay {
  position: absolute;
  /* Posicionamiento porcentual exacto sobre la tablet lateral (imagen recortada y maximizada) */
  left: 61%;
  top: 24%;
  width: 36%;
  height: 55%;
  transform: none;
  background: transparent;
  border-radius: 18px;
  border: 2px solid transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 15;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.tablet-screen-overlay:hover {
  border-color: rgba(0, 186, 99, 0.65);
  box-shadow: 0 0 25px rgba(0, 186, 99, 0.35);
  transform: scale(1.02);
}

/* Contenedor del QR dentro de la tablet (el QR ya está integrado en la ilustración) */
.tablet-qr-box {
  display: none;
}

/* Callout animado que señala la tablet */
.tablet-pointer-callout {
  position: absolute;
  right: 1%;
  bottom: 8%;
  background: linear-gradient(135deg, var(--uncaus-green) 0%, var(--uncaus-green-bright) 100%);
  color: #ffffff;
  padding: clamp(0.35rem, 0.8vh, 0.55rem) clamp(0.6rem, 1.2vw, 0.95rem);
  border-radius: var(--radius-full);
  font-size: clamp(0.7rem, 1.4vh, 0.82rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 8px 20px rgba(0, 143, 76, 0.4);
  animation: pulseBadge 2.4s infinite;
  z-index: 20;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==========================================================================
   Panel de Folletos Digitales (Modo Sin Folletos)
   ========================================================================== */
.brochures-panel {
  display: flex;
  flex-direction: column;
}

.brochures-header {
  margin-bottom: clamp(0.5rem, 1.2vh, 1rem);
}

.brochures-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 180, 216, 0.16);
  border: 1px solid rgba(0, 180, 216, 0.4);
  color: #38bdf8;
  font-size: clamp(0.7rem, 1.3vh, 0.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.35rem;
}

.brochures-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vh, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brochures-header p {
  color: #94a3b8;
  font-size: clamp(0.78rem, 1.6vh, 0.95rem);
  margin-top: 0.2rem;
}

/* Grilla de Folletos Adaptativa */
.brochures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.8rem, 2vw, 1.5rem);
}

.brochure-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: clamp(0.85rem, 1.8vh, 1.4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--surface-border);
  transition: var(--transition-normal);
  color: var(--text-primary);
}

.brochure-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.brochure-card-tag {
  align-self: center;
  font-size: clamp(0.65rem, 1.2vh, 0.72rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.card-cursos .brochure-card-tag {
  background: var(--uncaus-green-soft);
  color: var(--uncaus-green);
}

.card-carreras .brochure-card-tag {
  background: #e0f2fe;
  color: #0369a1;
}

.brochure-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vh, 1.35rem);
  font-weight: 800;
  color: var(--uncaus-blue);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.brochure-card-desc {
  font-size: clamp(0.72rem, 1.4vh, 0.85rem);
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: clamp(0.6rem, 1.2vh, 1rem);
  min-height: 2.7em;
}

/* Marco del código QR del folleto */
.brochure-qr-wrapper {
  background: #ffffff;
  padding: clamp(0.5rem, 1.2vh, 0.9rem);
  border-radius: var(--radius-sm);
  border: 2px dashed #cbd5e1;
  box-shadow: var(--shadow-sm);
  margin-bottom: clamp(0.6rem, 1.2vh, 1rem);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-fast);
}

.brochure-card:hover .brochure-qr-wrapper {
  border-color: var(--uncaus-green);
  border-style: solid;
}

.brochure-qr-container {
  width: clamp(120px, min(20vh, 16vw), 180px);
  height: clamp(120px, min(20vh, 16vw), 180px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brochure-qr-container img,
.brochure-qr-container canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.brochure-card-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: clamp(0.45rem, 1vh, 0.65rem) 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: clamp(0.75rem, 1.4vh, 0.85rem);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.card-cursos .brochure-card-action {
  background: var(--uncaus-green);
  color: #ffffff;
}
.card-cursos .brochure-card-action:hover {
  background: #00773f;
}

.card-carreras .brochure-card-action {
  background: #0284c7;
  color: #ffffff;
}
.card-carreras .brochure-card-action:hover {
  background: #0369a1;
}

/* ==========================================================================
   Barra Inferior de Estado y Atajos
   ========================================================================== */
.main-footer {
  position: relative;
  z-index: 20;
  padding: clamp(0.4rem, 1vh, 0.7rem) clamp(1rem, 2.5vw, 2.2rem);
  background: rgba(6, 21, 36, 0.88);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: clamp(0.72rem, 1.3vh, 0.82rem);
  color: var(--text-muted);
  flex-shrink: 0;
}

.footer-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--uncaus-green-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--uncaus-green-bright);
  animation: pulseDot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.footer-center-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.footer-center-hint kbd {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: monospace;
}

.footer-url-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.footer-url-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Modales (Agrandar QR / Configuración)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 21, 36, 0.88);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vh, 2rem);
  max-width: min(440px, 92vw);
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  position: relative;
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.modal-close-btn:hover {
  background: #e2e8f0;
}

.modal-qr-large {
  width: clamp(180px, 35vh, 240px);
  height: clamp(180px, 35vh, 240px);
  margin: 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.modal-qr-large img,
.modal-qr-large canvas {
  width: 100% !important;
  height: 100% !important;
}

.config-input-group {
  text-align: left;
  margin: 1rem 0;
}

.config-input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--uncaus-blue);
  margin-bottom: 0.35rem;
}

.config-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid #cbd5e1;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.config-input:focus {
  border-color: var(--uncaus-green);
  box-shadow: 0 0 0 3px rgba(0, 186, 99, 0.2);
}

.config-help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ==========================================================================
   CONSULTAS DE MEDIOS (Media Queries Específicos)
   ========================================================================== */

/* 1. TV / Pantallas Grandes / 4K (> 1800px) */
@media (min-width: 1800px) {
  .presentation-stage.mode-with-brochures {
    max-width: 1250px;
  }
  .presentation-stage.mode-without-brochures {
    max-width: 1400px;
  }
  .presentation-stage.mode-without-brochures .brochures-panel {
    max-width: 740px;
  }
  .presentation-stage.mode-with-brochures .tatu-stage-wrapper {
    width: 580px;
    height: 580px;
  }
  .presentation-stage.mode-without-brochures .tatu-stage-wrapper {
    width: 460px;
    height: 460px;
  }
  .brochure-qr-container {
    width: 190px;
    height: 190px;
  }
}

/* 2. Notebooks con Altura Reducida (e.g. 1366x768 o ventanas con barras) */
@media (max-height: 760px) and (min-width: 992px) {
  .presentation-viewport {
    padding: 0.5rem 1.5rem;
  }
  .main-header {
    padding: 0.4rem 1.5rem;
  }
  .main-footer {
    padding: 0.35rem 1.5rem;
  }
  .presentation-stage.mode-with-brochures .tatu-panel {
    gap: 2rem;
  }
  .presentation-stage.mode-without-brochures {
    gap: 1.5rem;
  }
  .brochure-card {
    padding: 0.75rem;
  }
  .brochure-qr-wrapper {
    padding: 0.4rem;
    margin-bottom: 0.5rem;
  }
  .brochure-qr-container {
    width: 125px;
    height: 125px;
  }
  .brochure-card-desc {
    min-height: auto;
    margin-bottom: 0.5rem;
  }
}

/* 3. Tablets en Formato Paisaje / Pantallas Medianas (768px a 1100px) */
@media (max-width: 1100px) and (min-width: 769px) {
  .presentation-stage.mode-without-brochures {
    grid-template-columns: 44% 56%;
    gap: 1.5rem;
  }
  .brochures-grid {
    gap: 1rem;
  }
  .brochure-qr-container {
    width: 135px;
    height: 135px;
  }
}

/* 4. Tablets en Formato Vertical / Totems / Móviles (< 768px o Orientación Retrato) */
@media (max-width: 768px), (orientation: portrait) and (max-width: 1024px) {
  body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
  }

  .main-header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    justify-content: center;
  }

  .header-brand {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.25rem;
    text-align: center;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    gap: 0.75rem;
  }

  .mode-keyboard-tip {
    display: none; /* En pantallas táctiles no se necesita atajo físico */
  }

  .presentation-viewport {
    padding: 1.25rem 0.75rem;
    align-items: flex-start;
  }

  .presentation-stage.mode-with-brochures .tatu-panel {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .presentation-stage.mode-with-brochures .tatu-content {
    text-align: center;
    align-items: center;
  }

  .presentation-stage.mode-without-brochures {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .brochures-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
  }

  .brochure-qr-container {
    width: 160px;
    height: 160px;
  }

  .main-footer {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
    gap: 0.5rem;
  }

  .footer-center-hint {
    display: none;
  }
}

