body {
  min-height: 100vh;
  margin: 0;
  background-color: #000;
  background-image: radial-gradient(
  ellipse 80% 60% at 50% 0%,
 rgba(204, 198, 200, 0.342) 0%,
 rgba(0, 0, 0, 0.1) 70%,
 rgba(0, 0, 0, 0.5) 100%
  );
  justify-content: center;
  align-items: center;
  display: flex;
}

.contenedor{
    color: gainsboro;
    background-color: rgb(0, 0, 0);
    font-family: Arial, Helvetica, sans-serif;
    padding: 20px;
    width: 400px;
    height: 530px;
    border-radius: 20px;
    box-shadow: 0px 4px 16px rgb(146, 143, 143);
    flex-direction: column;
    display: flex;
    overflow: hidden;
    gap: 15px;
    margin-top: 60px;
    /*para hacer el fecto de aparición con scroll*/
    opacity: 0;
    transform: translateY(20px);
    animation: aparecer 2s ease-out forwards;
}
@keyframes aparecer {
  to {
    opacity: 1;
    transform: translateY(0);
  }

}

h1{
    font-family:'Times New Roman';
    filter: drop-shadow(3px 3px 4px rgb(119, 6, 113));
}
label{
     font-family:'Times New Roman';
     filter: drop-shadow(3px 3px 4px rgb(119, 6, 113));

}
input, textarea{
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.39);
    border-color: rgb(124, 5, 124);
    
}
textarea{
     resize: none; /* evita que el usuario lo pueda redimensionar */
}

#Mensaje{
    font-family: Georgia;
}

input::placeholder,
textarea::placeholder{
    color: black;
    font-family:Georgia, 'Times New Roman', Times, serif;
}
input[type="submit"]{
    cursor: pointer;
}
input:hover,
textarea:hover{
    background: linear-gradient(to right, #6f6f72e7, #97a08b);
}

input[type="submit"]{
    text-transform: uppercase;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    
}


header{
    width: 100%;
    height: 60px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;   /* Header fijo en pantalla */
    flex-direction: row; /* Elementos en fila */
    top: 0;            /* Pegado arriba */
    left: 0;           /* Pegado a la izquierda */
    padding: 0 20px;   /* Espacio interno a los lados */

}
nav{
    display: flex;
    gap: 250px;
    font-size: 30px;
}
nav a{
    text-decoration: none;
    color: rgb(170, 170, 170);
    font-family:fantasy;
    font-size: 23px;
}
nav a:hover{
    color: white;
}


/*--------------------------------*/

/* ============================================ */
/* MEDIA QUERIES RESPONSIVE - PÁGINA CONTACTO */
/* ============================================ */

/* Tablets (768px - 1024px) */
@media screen and (max-width: 1024px) {
  header {
    height: 70px;
  }

  nav {
    gap: 150px;
  }

  nav a {
    font-size: 20px;
  }

  .contenedor {
    width: 90%;
    max-width: 450px;
    height: auto;
    padding: 25px;
    margin-top: 80px;
  }

  h1 {
    font-size: 28px;
  }

  label {
    font-size: 16px;
  }

  input,
  textarea {
    font-size: 15px;
    padding: 12px;
  }
}

/* Móviles (hasta 768px) */
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }

  header {
    height: auto;
    padding: 15px 10px;
    position: fixed; /* CAMBIO: Mantener fixed en lugar de relative */
    background-color: rgba(0, 0, 0, 0.95); /* NUEVO: Fondo para visibilidad */
    z-index: 1000; /* NUEVO: Para que quede sobre el contenido */
  }

  nav {
    gap: 20px;
    font-size: 18px;
    justify-content: center;
  }

  nav a {
    font-size: 16px;
  }

  form {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 80px; /* NUEVO: Espacio para el header fijo */
  }

  .contenedor {
    width: 95%;
    max-width: 400px;
    height: auto;
    padding: 20px;
    margin-top: 0; /* CAMBIO: El margin ya está en form */
    gap: 12px;
  }

  h1 {
    font-size: 24px;
    text-align: center;
    margin: 0 0 10px 0;
  }

  label {
    font-size: 15px;
  }

  input,
  textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 10px;
  }

  textarea {
    min-height: 80px;
  }

  input[type="submit"] {
    margin-top: 10px;
    padding: 12px;
    font-size: 16px;
  }
}

/* Móviles pequeños (hasta 480px) */
@media screen and (max-width: 480px) {
  nav {
    gap: 15px;
  }

  nav a {
    font-size: 14px;
  }

  .contenedor {
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    gap: 10px;
    margin-top: 0; /* Mantener en 0 porque form tiene el margin */
  }

  h1 {
    font-size: 20px;
  }

  label {
    font-size: 14px;
  }

  input,
  textarea {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 15px;
  }

  textarea {
    min-height: 70px;
  }

  input[type="submit"] {
    padding: 10px;
    font-size: 14px;
  }
}

/* Landscape móvil */
@media screen and (max-width: 768px) and (orientation: landscape) {
  body {
    min-height: auto;
  }

  .contenedor {
    margin-top: 0; /* CAMBIO: margin ya está en form */
    margin-bottom: 30px;
    max-width: 500px;
  }

  header {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
  }

  form {
    margin-top: 90px; /* NUEVO: Espacio para header en landscape */
  }
}

/* Ajuste para pantallas muy anchas pero bajas */
@media screen and (max-height: 600px) {
  .contenedor {
    margin-top: 0; /* Mantener en 0 */
    margin-bottom: 20px;
    gap: 8px;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 5px;
  }

  input,
  textarea {
    padding: 8px;
  }

  textarea {
    min-height: 60px;
  }

  form {
    margin-top: 70px; /* NUEVO: Espacio para header */
  }
}

/* Mejora la experiencia táctil en móviles */
@media (hover: none) and (pointer: coarse) {
  input,
  textarea {
    font-size: 16px; /* Evita zoom automático en iOS */
  }

  input[type="submit"] {
    min-height: 44px; /* Tamaño mínimo recomendado para touch */
  }
}