:root{
  --usmp-red:#B5121B;
  --usmp-dark:#8C0F15;
  --usmp-light:#f4f6f9;
  --usmp-gray:#e4e6eb;
  --text:#333;
  --radius:18px;
  --transition:0.3s ease;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  font-family:'Segoe UI',system-ui,-apple-system,sans-serif;
  background:linear-gradient(135deg,#f4f6f9,#e9edf2);
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  -webkit-font-smoothing:antialiased;
}

.header{
  width:100%;
  background:white;
  box-shadow:0 4px 20px rgba(0,0,0,0.05);
  position:sticky;
  top:0;
  z-index:100;
  overflow-x: hidden;
}

.branding{
  width: 100%;
  max-width: 100%;
  margin: 0;
  /* max-width:1300px;
  margin:auto; */
  padding:20px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-sizing: border-box;
}

.branding-left{
  display:flex;
  align-items:center;
  gap:18px;
  /* min-width: 0; */
}

.branding-right{
  display:flex;
  align-items:center;
  gap:15px;
}

.logo{
  height:55px;
  width:auto;
  transition:transform 0.3s ease;
}

.logo:hover{
  transform:scale(1.05);
}

.branding-text h1{
  font-size:24px;
  color:var(--usmp-red);
  font-weight:700;
  margin-bottom:3px;
}

.branding-text p{
  /* font-size:13px;
  color:#777;
  letter-spacing:0.3px; */
  white-space: nowrap;      /* Evita que el texto salte de línea bruscamente */
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-badge{
  background:var(--usmp-light);
  padding:6px 14px;
  border-radius:30px;
  font-size:15px;
  font-weight:600;
  color:var(--usmp-red);
  transition:var(--transition);
}


.main{
  flex:1;
  padding:70px 20px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.section-title{
  font-size:26px;
  margin-bottom:45px;
  color:var(--usmp-red);
  font-weight:600;
}


.card-grid{
  width:100%;
  max-width:1200px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:30px;
}


.card{
  background:white;
  border-radius:var(--radius);
  padding:30px 25px;
  box-shadow:0 8px 25px rgba(0,0,0,0.06);
  cursor:pointer;
  position:relative;
  overflow:hidden;
  transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover{
  transform:translateY(-8px);
  box-shadow:0 18px 45px rgba(0,0,0,0.12);
}

.card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  height:4px;
  width:100%;
  background:var(--usmp-red);
}

.card-icon{
  width:50px;
  height:50px;
  margin-bottom:20px;
}

.card h3{
  color:var(--usmp-red);
  margin-bottom:10px;
  font-size:18px;
}

.card p{
  font-size:14px;
  color:#666;
  line-height:1.6;
}


.footer{
  text-align:center;
  padding:18px;
  font-size:13px;
  background:#fff;
  border-top:1px solid #eee;
  color:#777;
}

#loader{
  position:fixed;
  inset:0;
  background:white;
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
  transition:opacity 0.6s ease, visibility 0.6s ease;
}

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

.loader-logo{
  height:70px;
  margin-bottom:25px;
  animation:pulse 1.8s infinite ease-in-out;
}

.loader-line{
  width:0;
  height:4px;
  background:var(--usmp-red);
  border-radius:4px;
  animation:loadingBar 2s ease forwards;
}

@keyframes pulse{
  0%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(1.06); opacity:0.85; }
  100%{ transform:scale(1); opacity:1; }
}

@keyframes loadingBar{
  0%{ width:0; }
  100%{ width:180px; }
}

#loader.hidden{
  opacity:0;
  visibility:hidden;
}

body.dark{
  background:linear-gradient(135deg,#1c1f26,#111);
  color:#eee;
}

body.dark .header{
  background:#1e222b;
  box-shadow:none;
}

body.dark .branding-text p{
  color:#aaa;
}

body.dark .year-badge{
  background:#2a2f3a;
  color:#fff;
}

body.dark .card{
  background:#1e222b;
  box-shadow:0 8px 25px rgba(0,0,0,0.4);
}

body.dark .card p{
  color:#bbb;
}

body.dark .footer{
  background:#1e222b;
  border-top:1px solid #333;
}

body.dark #loader{
  background:#1c1f26;
}

.dark-btn{
  background:var(--usmp-light);
  border:none;
  padding:8px 14px;
  border-radius:30px;
  cursor:pointer;
  font-size:15px;
  transition:var(--transition);
}

.dark-btn:hover{
  background:var(--usmp-gray);
}

body.dark .dark-btn{
  background:var(--usmp-red);
  color:white;
}

.fade-in{
  animation:fadeIn 0.6s ease forwards;
}

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

.slide-left{
  animation:slideLeft 0.4s ease forwards;
}

@keyframes slideLeft{
  from{opacity:0; transform:translateX(40px);}
  to{opacity:1; transform:translateX(0);}
}

@media(max-width:768px){

  /* .branding{
    padding:18px;
  } */

  .branding-text h1{
    font-size:20px;
  }

  .section-title{
    font-size:20px;
    text-align:center;
  }

  .main{
    padding:50px 15px;
  }

}


.container-center{
  width:100%;
  display:flex;
  justify-content:center;
  padding:40px 20px;
}


.card--compact{
  padding:18px 20px;
}

.card--stack{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:210px; 
}

.card-title{
  margin:0;
  font-size:20px;
  font-weight:700;
  color:var(--usmp-red);
  text-align:left;
}

.card-subtitle{
  margin:0;
  font-size:14px;
  color:#666;
  line-height:1.55;
  text-align:left;
}

.card-actions{
  margin-top:auto;
  padding-top:12px;
  display:flex;
  justify-content:flex-start;
  gap:10px;
}

.btn{
  border:none;
  cursor:pointer;
  font-family:inherit;
  transition:var(--transition);
}

.btn--pill{
  border-radius:999px;
  padding:10px 16px;
  font-size:14px;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.btn--primary{
  background:var(--usmp-red);
  color:#fff;
  box-shadow:0 10px 18px rgba(181,18,27,0.18);
}

.btn--primary:hover{
  background:var(--usmp-dark);
  transform:translateY(-1px);
}

.btn-prev{
  background:#ccc;
  color:#333;
}

body.dark .card-subtitle{
  color:#bbb;
}

body.dark .btn--primary{
  box-shadow:0 10px 18px rgba(0,0,0,0.35);
}

@media(max-width:768px){
  .card--compact{
    padding:16px 16px;
  }
  .card--stack{
    min-height:220px;
  }
  .card-title{
    font-size:18px;
  }
}

.btn--ghost{
  background:transparent;
  border:1px solid var(--usmp-gray);
  color:var(--usmp-red);
}

.btn--ghost:hover{
  background:var(--usmp-light);
  transform:translateY(-1px);
}

.card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.card-header .card-header__left{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.btn--sm{
  padding:8px 12px;
  font-size:13px;
}

body.dark .btn--ghost{
  border-color:#333;
  color:#fff;
}

body.dark .btn--ghost:hover{
  background:#2a2f3a;
}

#confettiContainer{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 99999;

  display: none;   
}


.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.85);
  justify-content:center;
  align-items:center;
  z-index:10000;
  padding: 20px;
  overflow: auto;
}

.modal img{
  max-width: 95%;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius:10px;
  cursor: zoom-out;
  transition: transform 0.3s ease;
}

.modal img:hover {
  transform: scale(1.02);
}

.finish-modal{
  display:none;                
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  justify-content:center;
  align-items:center;
  z-index:10001;
}

.finish-box{
  background:#fff;
  padding:36px 34px;
  border-radius:14px;
  text-align:center;
  max-width:450px;
  width:calc(100% - 40px);
  box-shadow:0 18px 45px rgba(0,0,0,0.18);
}

body.dark .finish-box{
  background:#1e222b;
  color:#eee;
}


#confettiContainer{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:10002;
  display:none;                
}

.confetti{
  position:absolute;           
  opacity:0.95;
  animation:confettiFall linear forwards;
}

.confetti.square{ border-radius:2px; }
.confetti.circle{ border-radius:50%; }
.confetti.strip{
  width:4px !important;
  height:18px !important;
  border-radius:3px;
}

@keyframes confettiFall{
  0%{ transform:translateY(-20px); }
  100%{
    transform:
      translateY(110vh)
      translateX(calc(100px - 200px * var(--random-x)))
      rotate(1080deg);
    opacity:0;
  }
}

.video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius);
  margin: 20px 0;
}
.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Estilos Responsivos Adicionales */
@media (max-width: 768px) {
  .branding {
    flex-direction: column;
    text-align: center;
    /*gap: 15px;
    padding: 15px; */
    padding: 15px 3%; /* Un padding más controlado en móviles */
    /* flex-direction: column;
    text-align: center;*/
    gap: 15px; 
    flex-wrap: nowrap;
  }
  .branding-left {
    flex-direction: column;
    /* gap: 10px; */
    align-items: center;
    min-width: 0;
  }
  .branding-right {
    justify-content: center;
    width: 100%;
  }
  .branding-text h1 {
    font-size: 1.1rem;
    white-space: nowrap;
  }
  .branding-text p {
    /* display: none; */
    font-size: 0.8rem;          
  }
  
  .logo {
    height: 4.5rem;           
  } 

  .main {
    padding: 20px 10px;
  }
  .section-title {
    font-size: 20px;
    margin-bottom: 25px;
    text-align: center;
  }
  .card-grid {
    width: 75%;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card h3{
    text-align: center;
  }

  .card p{
    text-align: center;
  }
  .asistencia-card, .ingreso-card {
    height: auto !important;
    min-height: 400px;
    padding: 15px !important;
    margin: 0;
    width: 100%;
    box-shadow: none;
    border: 1px solid var(--usmp-gray);
  }
  .card-header {
    flex-direction: column;
    align-items: center !important;
    text-align: center;
    gap: 15px;
    margin-bottom: 20px;
  }
  .card-header__left {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .card-header h2 {
    font-size: 18px !important;
    line-height: 1.3;
  }
  .step-indicator {
    font-size: 11px;
    padding: 4px 10px;
    background: var(--usmp-gray);
    border-radius: 12px;
    margin-bottom: 5px;
  }
  .step-image {
    max-height: none !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    margin-top: 15px;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: zoom-in;
    touch-action: manipulation;
  }
  .nav {
    margin-top: 20px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .btn {
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
    max-width: 200px;
  }
  #exitBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    width: auto;
  }
}

/* Soporte para pinch-to-zoom en móviles */
@media (max-width: 768px) {
  html {
    touch-action: manipulation;
  }
  
  .step-image {
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
  }
}

/* Modo landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
  .step-image {
    max-height: 80vh;
    margin: 10px 0;
  }
}

/* Estilos generales para imágenes responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.step-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: zoom-in;
  transition: transform 0.3s ease, filter 0.3s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.step-image:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.15));
}

.step-image:active {
  transform: scale(1.03);
}

/* Soporte para zoom táctil en móviles */
@supports (touch-action: manipulation) {
  .step-image {
    touch-action: manipulation;
  }
}

/* Imagen en modal/fullscreen */
.modal img,
.image-zoom {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* Contenedor responsive para imágenes */
.image-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-container img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
