@font-face {
  font-family: neue;
  src: url(/fonts/PPNeueMontreal-Book.otf);
}

:root{
  --accent:#CF4E63;
  --overlay-bg: rgba(0,0,0,0.6);
  --button-size: clamp(40px, 6vw, 60px);
  --window-border: none;
  cursor: url('/img/cursor.svg'), auto;
}

html,body{
  height:100%;
  margin:0;
  font-family: neue;
  background:linear-gradient(180deg,#e9f0f8 0%, #f7fbff 100%);
}

.window-btn:hover {
  cursor: url('/img/cursorpointer.svg'), auto;
}

.stage{
  max-width:100%;
  margin:0;
  padding:0;
  box-sizing:border-box;
}

.house-wrap{
  position:relative;
  width:100%;
  aspect-ratio: 16/9;
  max-height:auto;
  background: url('/img/calendario2.jpg') center/contain no-repeat;
  box-shadow:0 10px 30px rgba(0,0,0,0.12);
  overflow:hidden;
}

/* Clickable zones (styled like little windows/buttons) */
.window-btn{
  position:absolute;
  width:clamp(7vw, 6vw, 70px);
  height:clamp(6vw, 4vw, 70px);
  display:grid;
  place-items:center;
  background-color:rgba(242, 242, 242, 0);
  cursor:pointer;
  border: none;
  user-select:none;
  transition:transform .14s ease, box-shadow .14s ease;
}

.window-btn:active{
    transform:scale(.98)
}


.window-label{
  font-weight:700;
  font-size:0.9rem;
  color:var(--accent);
  pointer-events:none;
}

/* Example positions for 12 windows. Adjust percentages to match your house picture */
/* Each button has an inline style with --x and --y set in the HTML for clarity; fallback classes included */

.window-btn[data-index="1"]{left:42.5%; top:80%}
.window-btn[data-index="2"]{left:51.5%; top:80%}
.window-btn[data-index="3"]{left:38%; top:67%}
.window-btn[data-index="4"]{left:46.4%; top:68%}

.window-btn[data-index="5"]{left:55%; top:67%}
.window-btn[data-index="6"]{left:38%; top:51%}
.window-btn[data-index="7"]{left:46.8%; top:51.5%}
.window-btn[data-index="8"]{left:55%; top:51%}

.window-btn[data-index="9"]{left:39%; top:36%}
.window-btn[data-index="10"]{left:46.8%; top:36.5%}
.window-btn[data-index="11"]{left:54.5%; top:35%}
.window-btn[data-index="12"]{left:47%; top:12%}

/* Modal (popup) */
.overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1200;
  background:var(--overlay-bg);
}

.overlay.active{
  display:flex;
}

.modal{
  width:100%;
  max-width:100vw;
  max-height:100vh;
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,0.4);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* Botón cerrar dentro del video */
.close-inside {
  position:absolute;
  top:12px;
  right:12px;
  z-index:20;
  background:rgba(0,0,0,0.55);
  color:white;
  border:none;
  border-radius:50%;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  cursor:pointer;
  transition:opacity .2s ease;
}

.close-inside:hover {
  background:rgba(0,0,0,0.75);
}

.modal-body{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1;
}

.modal-body img, .modal-body video{
  max-width:100%;
  max-height:78vh;
  display:block;
}

.close-btn:focus{
    outline:3px solid rgba(0,0,0,0.08)
}

/* ANIMACIÓN DEL POPUP (MODAL)    */

/* Estado inicial del overlay (oculto y transparente) */
.overlay {
  position:fixed;
  inset:0;
  display:flex; /* mantenemos flex para animar correctamente */
  align-items:center;
  justify-content:center;
  z-index:1200;
  background:var(--overlay-bg);
  opacity:0; /* empieza invisible */
  pointer-events:none; /* no interactúa hasta ser visible */
  transition: opacity .35s ease; /* animación de aparición */
}

/* Cuando el overlay está activo */
.overlay.active{
  opacity:1;                 /* se vuelve visible */
  pointer-events:auto;       /* ahora sí se puede clickear */
}
  
/* Estado inicial del modal: reducido y transparente */
.modal{
  max-width:1000px;
  width:100%;
  max-height:100vh;
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,0.4);
  overflow:hidden;
  display:flex;
  flex-direction:column;

  transform:scale(0.8);     /* empieza más pequeño */
  opacity:0;                 /* empieza invisible */
  transition: transform .35s ease, opacity .35s ease;
}

/* Animación cuando aparece dentro de .overlay.active */
.overlay.active .modal{
  transform:scale(1);        /* tamaño normal */
  opacity:1;                 /* completamente visible */
}

/* Nieve */
@-moz-keyframes nieve{	
    from{top:-40px;}
    to{top:101%;}
}
@-webkit-keyframes nieve{	
    from{top:-40px;}
    to{top:2000px;}
}
@keyframes nieve{	
    from{top:-40px;}
    to{top:2000px;}
}

@-moz-keyframes horiz2{
    20%{transform:translateX(0);}
    50%{transform:translateX(150px);}
    80%{transform:translateX(0);}
}
@-webkit-keyframes horiz2{
    20%{transform:translateX(0);}
    50%{transform:translateX(150px);}
    80%{transform:translateX(0);}
}
@keyframes horiz2{
    20%{transform:translateX(0);}
    50%{transform:translateX(-70px);}
    80%{transform:translateX(0);}
}

@-moz-keyframes horiz{
    20%{transform:translateX(0);}
    50%{transform:translateX(150px);}
    80%{transform:translateX(0);}
}
@-webkit-keyframes horiz{
    20%{transform:translateX(0);}
    50%{transform:translateX(150px);}
    80%{transform:translateX(0);}
}
@keyframes horiz{
    20%{transform:translateX(0);}
    50%{transform:translateX(150px);}
    80%{transform: translateX(0);}
}
    
.tpl-snow > div{position:fixed;-webkit-animation:ease-in infinite normal;-moz-animation:ease-in infinite normal;animation:ease-in infinite normal;}	
.tpl-snow > div{z-index:9999999999999;width:30px;height:30px;border-radius:50%;-webkit-animation-name:nieve,horiz;-moz-animation-name:nieve,horiz;animation-name:nieve,horiz;}
.tpl-snow > div:nth-of-type(odd){width:10px; height:10px;-webkit-animation-name:nieve,horiz2;-moz-animation-name:nieve,horiz2;animation-name:nieve,horiz2;}
.tpl-snow > div:nth-of-type(odd){width:15px; height:15px;-webkit-animation-name:nieve,horiz2;-moz-animation-name:nieve,horiz2;animation-name:nieve,horiz2;}

.tpl-snow > div:nth-of-type(1){left:40px;-webkit-animation-duration:5.5s;-moz-animation-duration:5.5s;animation-duration:5.5s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(2){left:120px;-webkit-animation-duration:7s;-moz-animation-duration:7s;animation-duration:7s;}
.tpl-snow > div:nth-of-type(3){left:200px;-webkit-animation-duration:8s;-moz-animation-duration:8s;animation-duration:8s;}
.tpl-snow > div:nth-of-type(4){left:20%;-webkit-animation-duration:6s;-moz-animation-duration:6s;animation-duration:6s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(5){left:30%;-webkit-animation-duration:9s;-moz-animation-duration:9s;animation-duration:9s;}
.tpl-snow > div:nth-of-type(6){left:40%;-webkit-animation-duration:7.2s;-moz-animation-duration:7.2s;animation-duration:7.2s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(7){left:50%;-webkit-animation-duration:10s;-moz-animation-duration:10s;animation-duration:10s;}
.tpl-snow > div:nth-of-type(8){left:60%;-webkit-animation-duration:6.4s;-moz-animation-duration:6.4s;animation-duration:6.4s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(9){left:70%;-webkit-animation-duration:10s;-moz-animation-duration:10s;animation-duration:10s;-webkit-animation-delay:1.4s;-moz-animation-delay:1.4s;animation-delay:1.4s;}
.tpl-snow > div:nth-of-type(10){left:80%;-webkit-animation-duration:8s;-moz-animation-duration:8s;animation-duration:8s;}
.tpl-snow > div:nth-of-type(11){left:90%;-webkit-animation-duration:7.1s;-moz-animation-duration:7.1s;animation-duration:7.1s;-webkit-animation-delay:2s;-moz-animation-delay:2s;animation-delay:2s;}
.tpl-snow > div:nth-of-type(12){left:99%;-webkit-animation-duration:6.6s;-moz-animation-duration:6.6s;animation-duration:6.6s;-webkit-animation-delay:1.6s;-moz-animation-delay:1.6s;animation-delay:1.6s;}
.tpl-snow > div:nth-of-type(13){left:10px;-webkit-animation-duration:10.2s;-moz-animation-duration:10.2s;animation-duration:10.2s;}
.tpl-snow > div:nth-of-type(14){left:180px;-webkit-animation-duration:12s;-moz-animation-duration:12s;animation-duration:12s;}
.tpl-snow > div:nth-of-type(15){left:213px;-webkit-animation-duration:7.3s;-moz-animation-duration:7.3s;animation-duration:7.3s;-webkit-animation-delay:.5s;-moz-animation-delay:.5s;animation-delay:.5s;}
.tpl-snow > div:nth-of-type(16){left:23%;-webkit-animation-duration:9.2s;-moz-animation-duration:9.2s;animation-duration:9.2s;}
.tpl-snow > div:nth-of-type(17){left:38%;-webkit-animation-duration:5s;-moz-animation-duration:5s;animation-duration:5s;}
.tpl-snow > div:nth-of-type(18){left:45%;-webkit-animation-duration:15s;-moz-animation-duration:15s;animation-duration:15s;}
.tpl-snow > div:nth-of-type(19){left:58%;-webkit-animation-duration:5s;-moz-animation-duration:5s;animation-duration:5s;}
.tpl-snow > div:nth-of-type(20){left:64%;-webkit-animation-duration:12s;-moz-animation-duration:12s;animation-duration:12s;}
.tpl-snow > div:nth-of-type(21){left:76%;-webkit-animation-duration:5.6s;-moz-animation-duration:5.6s;animation-duration:5.6s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(22){left:86%;-webkit-animation-duration:8.5s;-moz-animation-duration:8.5s;animation-duration:8.5s;}
.tpl-snow > div:nth-of-type(23){left:83%;-webkit-animation-duration:14.4s;-moz-animation-duration:14.4s;animation-duration:14.4s;}
.tpl-snow > div:nth-of-type(24){left:95%;-webkit-animation-duration:12s;-moz-animation-duration:12s;animation-duration:12s;}
.tpl-snow > div:nth-of-type(25){left:55px;-webkit-animation-duration:8.7s;-moz-animation-duration:8.7s;animation-duration:8.7s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;animation-delay:1.2s;}
.tpl-snow > div:nth-of-type(26){left:133px;-webkit-animation-duration:5.2s;-moz-animation-duration:5.2s;animation-duration:5.2s;}
.tpl-snow > div:nth-of-type(27){left:215px;-webkit-animation-duration:10.4s;-moz-animation-duration:10.4s;animation-duration:10.4s;-webkit-animation-delay:1.6s;-moz-animation-delay:1.6s;animation-delay:1.6s;}
.tpl-snow > div:nth-of-type(28){left:26%;-webkit-animation-duration:9s;-moz-animation-duration:9s;animation-duration:9s;}
.tpl-snow > div:nth-of-type(29){left:33%;-webkit-animation-duration:12s;-moz-animation-duration:12s;animation-duration:12s;}
.tpl-snow > div:nth-of-type(30){left:49%;-webkit-animation-duration:9.4s;-moz-animation-duration:9.4s;animation-duration:9.4s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(31){left:55%;-webkit-animation-duration:9.1s;-moz-animation-duration:9.1s;animation-duration:9.1s;}
.tpl-snow > div:nth-of-type(32){left:68%;-webkit-animation-duration:9.6s;-moz-animation-duration:9.6s;animation-duration:9.6s;-webkit-animation-delay:.5s;-moz-animation-delay:.5s;animation-delay:.5s;}
.tpl-snow > div:nth-of-type(33){left:73%;-webkit-animation-duration:12.4s;-moz-animation-duration:12.4s;animation-duration:12.4s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(34){left:85%;-webkit-animation-duration:9s;-moz-animation-duration:9s;animation-duration:9s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s;animation-delay:1.5s;}
.tpl-snow > div:nth-of-type(35){left:93%;-webkit-animation-duration:5s;-moz-animation-duration:5s;animation-duration:5s;}
.tpl-snow > div:nth-of-type(36){left:99%;-webkit-animation-duration:10.6s;-moz-animation-duration:10.6s;animation-duration:10.6s;}
.tpl-snow > div:nth-of-type(37){left:15px;-webkit-animation-duration:9.6s;-moz-animation-duration:9.6s;animation-duration:9.6s;}
.tpl-snow > div:nth-of-type(38){left:99px;-webkit-animation-duration:7.5s;-moz-animation-duration:7.5s;animation-duration:7.5s;}
.tpl-snow > div:nth-of-type(39){left:260px;-webkit-animation-duration:11s;-moz-animation-duration:11s;animation-duration:11s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(40){left:28%;-webkit-animation-duration:19s;-moz-animation-duration:19s;animation-duration:19s;}
.tpl-snow > div:nth-of-type(41){left:35%;-webkit-animation-duration:14s;-moz-animation-duration:14s;animation-duration:14s;}
.tpl-snow > div:nth-of-type(42){left:43%;-webkit-animation-duration:5.6s;-moz-animation-duration:5.6s;animation-duration:5.6s;}
.tpl-snow > div:nth-of-type(43){left:53%;-webkit-animation-duration:8.8s;-moz-animation-duration:8.8s;animation-duration:8.8s;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;}
.tpl-snow > div:nth-of-type(44){left:66%;-webkit-animation-duration:16s;-moz-animation-duration:16s;animation-duration:16s;}
.tpl-snow > div:nth-of-type(45){left:78%;-webkit-animation-duration:6s;-moz-animation-duration:6s;animation-duration:6s;}
.tpl-snow > div:nth-of-type(46){left:88%;-webkit-animation-duration:9.5s;-moz-animation-duration:9.5s;animation-duration:9.5s;-webkit-animation-delay:.5s;-moz-animation-delay:.5s;animation-delay:.5s;}
.tpl-snow > div:nth-of-type(47){left:94%;-webkit-animation-duration:7.6s;-moz-animation-duration:7.6s;animation-duration:7.6s;}
.tpl-snow > div:nth-of-type(48){left:96%;-webkit-animation-duration:8.2s;-moz-animation-duration:8.2s;animation-duration:8.2s;-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s;}

/* Responsive */
@media (max-width: 768px) {
  .house-wrap {
    background: url('/calendario26/img/arbolVertical.jpg') center center / cover no-repeat;
    height: 100vh; /* Ocupa toda la altura de la ventana */
    aspect-ratio: auto; /* Anula el aspect-ratio para móviles */
  }
}

@media (max-width:520px){
  .window-btn{
    width:44px;
    height:44px;
    font-size:13px
  }
}

@media (max-width: 768px) {
  .window-btn {
    width: 16vw;
    height: 13vw;
    border-width: 1px;
  }
  .window-btn[data-index="1"] { left:32%; top: 67%; }
  .window-btn[data-index="2"] { left: 57%; top: 67%; }
  .window-btn[data-index="3"] { left: 18%; top: 58%; }
  .window-btn[data-index="4"] { left:44%; top:59%; }

  .window-btn[data-index="5"]{left:68%; top:58%}
  .window-btn[data-index="6"]{left:20%; top:47%}
  .window-btn[data-index="7"]{left:44%; top:48%}
  .window-btn[data-index="8"]{left:66%; top:47%}

  .window-btn[data-index="9"]{left:23%; top:37%}
  .window-btn[data-index="10"]{left:44%; top:37%}
  .window-btn[data-index="11"]{left: 65%; top:37%}
  .window-btn[data-index="12"]{left:44%; top:21%}
}
