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

/* =====================
   CHECKBOX CONTROL
===================== */
#modal-toggle {
  display: none;
}

/* =====================
   FONDO MODAL (OVERLAY)
===================== */
.custom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease;
  z-index: 9999;
}

/* ABRIR CON DELAY */
#modal-toggle:checked + .custom-modal {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 1s;
}

/* =====================
   CONTENEDOR PRINCIPAL
===================== */
.custom-modal-box {
  position: relative;

  width: 500px;
  height: 600px;
  max-width: 90vw;
  max-height: 90vh;

  background-image: url("/img/popup-mobile.png");
 /* background-image: url("/img/popup-bg.jpg");*/
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  overflow: hidden;
  border-radius: 16px;

  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05);

  transform: scale(0.7);
  opacity: 0;

  transition:
    transform 0.45s ease,
    opacity 0.45s ease;
}

/*.custom-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* ajusta la opacidad aquí 
  z-index: 1;
}*/

/* =====================
   MARCO DEGRADADO
===================== */
.custom-modal-box::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 5px;

  background: linear-gradient(135deg, #b6dbe5, #ec97d8);
  border-radius: 16px;

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  pointer-events: none;
  z-index: 4;
}

/* =====================
   OVERLAY INTERNO
===================== */
.custom-modal-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0); /*background: rgba(0,0,0,0.4);*/
  z-index: 1;
}

/* ANIMACIÓN AL ABRIR */
#modal-toggle:checked + .custom-modal .custom-modal-box {
  transform: scale(1);
  opacity: 1;
  transition-delay: 1s;
}


/* =====================
   CONTENIDO INTERNO
===================== */
.modal-inner {
  position: relative;
  z-index: 2;

  max-width: 100%;
  max-height: 100%;

  text-align: center;
  color: #fff;
  padding: 25px;

  transform: scale(0.85);
  opacity: 0;

  transition:
    transform 0.45s ease,
    opacity 0.45s ease;

   display: flex !important; 
  flex-direction: column !important; 
  height: 100% !important;
}

/* ENTRADA DEL CONTENIDO */
#modal-toggle:checked + .custom-modal .modal-inner {
  transform: scale(1);
  opacity: 1;
  transition-delay: 1.15s;
}

/* =====================
   BOTÓN CERRAR (CÍRCULO)
===================== */
.custom-close {
  position: absolute;
  top: 12px;
  right: 12px;

  width: 36px;
  height: 36px;

  background: #e63946;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  font-weight: bold;
  line-height: 1;

  cursor: pointer;
  border-radius: 50%;

  z-index: 5;

  transition: background 0.25s ease, transform 0.15s ease;
}

.custom-close:hover {
  background: #c1121f;
  transform: scale(1.05);
}

/* =====================
   IMAGEN INTERNA
===================== */
.modal-inner img {
  display: block;
  max-width: 180px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px auto;
}

/* =====================
   TEXTOS
===================== */
.modal-inner h1 {
  font-size: 2rem;
  margin-bottom: 0;
  color: #095284;
}

.modal-inner h2 {
  font-size: 1.3rem;
  font-weight: 300;
  color: #000;
}

.modal-inner h3 {
  font-size: 1.8rem;
  font-weight: 300;
  color: #095284;
}

.modal-inner h4 {
  font-size: 1.7rem;
  font-weight: 300;
  color: #000;
}

=====================
   RESPONSIVE
===================== 
@media (max-width: 600px) {
  .custom-modal-box {
    width: 90%;
    height: auto;
    min-height: 70vh;
  }

  .modal-inner h1 {
    font-size: 1.6rem;
  }

  .modal-inner h2 {
    font-size: 1.05rem;
  }
}
/*@media (max-width: 600px) {
  .popup-image {
    background-image: url("/img/popup-mobile.jpg");
  }*/

/* =====================
   TELEGRAM
===================== */
/*.telegram-btn {
  display: inline-block;
  margin-top: 0px;
  margin-bottom: 10px;
  padding: 14px 24px;
  background-color: #229ED9;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}*/

/* =====================
   boton al final del div
===================== */

.telegram-btn {
  display: inline-block;
  margin-top: auto;       /* EMPUJA EL BOTÓN ABAJO */
  margin-bottom: 10px;
  padding: 14px 24px;
  background-color: #229ED9;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}


.telegram-btn:hover {
  background-color: #1c8cc4;
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .telegram-btn {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .telegram-btn {
    width: 100%;
    font-size: 17px;
    padding: 16px;
  }
}

/** arreglos textos para version movil


/* =====================
   MOBILE FIX DEFINITIVO
===================== */
/*@media (max-width: 600px) {

  .custom-modal .modal-inner {
    padding: 22px 18px;
  }

  .custom-modal .modal-inner h1 {
    font-size: 1.45rem !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
  }

  .custom-modal .modal-inner h2 {
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }

  .custom-modal .modal-inner h3 {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
    margin-bottom: 12px !important;
  }

  .custom-modal .modal-inner h4 {
    font-size: 1.1rem !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
  }

  .custom-modal .telegram-btn {
    margin-top: 14px;
  }

}*/

