:root {
    --babypowder: rgba(253, 255, 252, 1);
    --raisinblack: rgba(33, 26, 29, 1);
    --primary: rgba(0, 74, 173, 1);
    --secondary: rgba(93, 187, 230, 1);
    --purple: rgba(81, 51, 151, 1);
    --pink: rgba(138, 59, 151, 1);
}

.maincontent {
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
}

.contact-form-section {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
    background: linear-gradient(to right, rgba(33, 26, 29, 1), rgba(93, 187, 230, 0)), url('/images/contact.png');
    background-size: cover;
    background-position: center;
    border-radius: 2rem;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
    color: var(--babypowder);
}

.form-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.contact-form {
    margin-top: 1rem;
    width: 80%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem; /* Espaciado entre columnas y filas */
    background-color: rgba(253, 255, 252, .5);
    padding: 1rem;
    border-radius: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2; /* Hace que el textarea ocupe el ancho completo */
}

.form-group label {
    color: var(--raisinblack);
    margin-bottom: .5rem;
}

textarea {
    resize: vertical;
}

.clearbtn {
    grid-column: span 2;
    width: 100%;
}

/* Espaciado general */
.contact-form-section {
    padding: 2rem 1rem;
}

/* Modal */
.alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.alert-content {
    background: #ffffff;
    padding: 2rem;
    text-align: center;
    border-radius: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
}

.alert-content img {
    width: 180px;
    margin-bottom: 1rem;
}

.alert-content h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.alert-content p {
    color: var(--raisinblack);
    margin-bottom: 2rem;
}

.btn-spinner {
    display: inline-block;
    width: 50px;
  height: 12px;
  --dot-size: 12px;
  --_g: no-repeat radial-gradient(circle closest-side, var(--babypowder) 90%, transparent);
  background:
    var(--_g) 0% 50%,
    var(--_g) 50% 50%,
    var(--_g) 100% 50%;
  background-size: var(--dot-size) var(--dot-size);
  background-position: 0% 50%, 50% 50%, 100% 50%;
  animation: loader-animation 1.2s infinite ease-in-out;
}

@keyframes loader-animation {
    0%, 100% {
        background-size: var(--dot-size) var(--dot-size), var(--dot-size) var(--dot-size), var(--dot-size) var(--dot-size);
    }
    33% {
        background-size: 0 var(--dot-size), var(--dot-size) var(--dot-size), var(--dot-size) var(--dot-size);
    }
    66% {
        background-size: var(--dot-size) var(--dot-size), 0 var(--dot-size), var(--dot-size) var(--dot-size);
    }
    83% {
        background-size: var(--dot-size) var(--dot-size), var(--dot-size) var(--dot-size), 0 var(--dot-size);
    }
}

.hidden {
    display: none;
}

/* Deshabilitar botón */
.clearbtn.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

@media screen and (max-width: 768px) {
    .contact-form {
        display: inline-block;
        grid-template-columns: 1fr;
        width: 100%;
        background-color: transparent;
        padding: 0;
    }

    .form-container {
        background: linear-gradient(to right, rgba(33, 26, 29, 1), rgba(93, 187, 230, 0));
    }

    .form-group label {
        color: rgba(253, 255, 252, .7);
    }

    input, select, textarea {
        margin-bottom: .8rem;
        padding: .3rem;
    }
}