/* General Styling */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  user-select: none;
}

.container {
  text-align: center;
  background-color: #d9d3c6;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 90%; /* Adjusted for responsiveness */
  max-width: 400px; /* Set a maximum width */
  margin: 20px;
}

/* Updated logo size */
.logo {
  width: 80%;
  height: 80%;
  margin: 0 auto;
  display: block;
}

h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

form label {
  display: none;
}

form span,
#contactEmailError {
  color: red;
  visibility: hidden;
  font-size: small;
  margin-top: 5px;
}

input[type="email"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 2px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  background-color: #1976d2;
  color: white;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}

button:hover {
  background-color: #0056b3;
}

nav a {
  font-size: small;
}

/* Modal styling */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  pointer-events: none;
}

.modal.fade-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  position: relative;
}

/* Close button styling */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 15px;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.popup {
  display: flex;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  pointer-events: none;
}

.popup.fade-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.popup p {
  padding: 20px;
  font-size: 16px;
  text-align: center;
}

footer {
  margin-top: 10px;
  font-size: 14px;
}

footer nav a {
  margin: 0 10px;
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
}

footer nav a:hover {
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

select,
textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

.textarea-container {
  position: relative;
  width: 100%;
}

textarea {
  font-family: Arial, sans-serif;
  resize: none;
  max-height: 200px;
  overflow: auto;
}

#charCount {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 10px;
  color: #666;
  pointer-events: none;
  margin-right: 10px;
}

/* loader styles */

.loading-state {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  opacity: 0; /* Inicialmente invisible */
  visibility: hidden; /* Asegura que el contenido no sea interactivo cuando esté oculto */
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.loading-state.show {
  opacity: 1;
  visibility: visible;
}
.loading {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 10px solid #ddd;
  border-top-color: #1976d2;
  animation: loading 1s linear infinite;
}
@keyframes loading {
  to {
    transform: rotate(360deg);
  }
}

/* Media queries for smaller screens */
@media (max-width: 600px) {
  .container {
    width: 95%; /* Expand to almost full width for small screens */
    padding: 20px; /* Reduce padding on small screens */
  }

  .logo {
    width: 70%; /* Make the logo larger on small screens */
  }

  h1 {
    font-size: 20px; /* Adjust font size for smaller screens */
  }

  p,
  button {
    font-size: 14px; /* Adjust font size for buttons and text */
  }

  footer nav a {
    margin: 0px;
  }

  #charCount {
    margin-right: 0px;
  }
}
