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

body {
    font-family: "Nunito", sans-serif;
    background-image: url('back.jpg');
    background-size: cover;
    background-position: center;
    -webkit-font-smoothing: antialiased;
    color: #333;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.back-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    height: 100vh;
}

/* Form */
.form-container {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease;
}

h1 {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: #444;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

input, textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #80b11f;
    box-shadow: 0 0 5px rgba(128, 177, 31, 0.5);
}

textarea {
    resize: none;
}

.bt-enviar {
    background-color: #80b11f;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.bt-enviar:hover {
    background-color: #6d971b;
    transform: scale(1.05);
}

/* Logo */
.logo-img {
    width: 50%;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 15px 20px;
    }

    h1 {
        font-size: 1.25rem;
    }

    .logo-img {
        width: 60%;
    }
}

/* Popup container (initially hidden) */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: popup-appear 0.4s ease-out;
}

@keyframes popup-appear {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Hidden popup close button */
#popup-close {
    margin-top: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #80b11f;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

#popup-close:hover {
    background-color: #6d971b;
}



.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: green;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
  }
  
  .checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: green;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #7ac142;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
  }
  
  .checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
  }
  
  svg {
    width: 100px;
    display: block;
    margin: 40px auto 0;
  }

  .path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
    &.circle {
      -webkit-animation: dash .9s ease-in-out;
      animation: dash .9s ease-in-out;
    }
    &.line {
      stroke-dashoffset: 1000;
      -webkit-animation: dash .9s .35s ease-in-out forwards;
      animation: dash .9s .35s ease-in-out forwards;
    }
    &.check {
      stroke-dashoffset: -100;
      -webkit-animation: dash-check .9s .35s ease-in-out forwards;
      animation: dash-check .9s .35s ease-in-out forwards;
    }
  }
           
  p {
    text-align: center;
    margin: 20px 0 20px;
    font-size: 1.25em;
    &.success {
      color: #73AF55;
    }
    &.error {
      color: #D06079;
    }
  }
  
  
  @-webkit-keyframes dash {
    0% {
      stroke-dashoffset: 1000;
    }
    100% {
      stroke-dashoffset: 0;
    }
  }
  
  @keyframes dash {
    0% {
      stroke-dashoffset: 1000;
    }
    100% {
      stroke-dashoffset: 0;
    }
  }
  
  @-webkit-keyframes dash-check {
    0% {
      stroke-dashoffset: -100;
    }
    100% {
      stroke-dashoffset: 900;
    }
  }
  
  @keyframes dash-check {
    0% {
      stroke-dashoffset: -100;
    }
    100% {
      stroke-dashoffset: 900;
    }
  }
  


  @keyframes stroke {
    100% {
      stroke-dashoffset: 0;
    }
  }
  @keyframes scale {
    0%, 100% {
      transform: none;
    }
    50% {
      transform: scale3d(1.1, 1.1, 1);
    }
  }
  @keyframes fill {
    100% {
      box-shadow: inset 0px 0px 0px 30px #fff;
    }
  }


@media (max-width: 480px) {
    .form-container {
        width: 100%;
        padding: 10px 15px;
    }

    h1 {
        font-size: 1rem;
    }

    .logo-img {
        width: 70%;
    }

    input, textarea {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .bt-enviar {
        font-size: 0.9rem;
    }
}

/* Media Query para pantallas bajas */
@media (max-height: 667px) {
    .form-container {
        padding: 10px 15px; /* Menor relleno en pantallas cortas */
    }

    .logo-img {
        width: 35%; /* Logo aún más pequeño */
    }

    h1 {
        font-size: 1rem;
        margin-bottom: 8px; /* Espacio más compacto */
    }

    input, textarea {
        padding: 6px;
        font-size: 0.85rem; /* Ajuste más pequeño para textos */
    }

    .bt-enviar {
        padding: 8px;
        font-size: 0.85rem;
    }
}

