* {
    margin: auto;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background-image: url('../images/fondo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

header {
    background-color: #449846;
    padding: 25px 0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

header .logo-principal {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

header .logo-principal a {
    text-decoration: none;
    color: rgb(245, 245, 245);
    font-weight: bold;
}

header .user-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 40px;
}

header .nombre_usuario {
    color: white;
    margin: 0;
}

header .logout img {
    height: 25px;
}

.titulo {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.linea-horizontal {
    width: 80%;
    height: 1px;
    background-color: #e4e4e4;
    margin: 0 auto;
}

.header2 {
    margin-bottom: 30px;
}

.alert-danger {
    margin-top: 10px;
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 0px;
    text-align: center;
}

.formulario, .formulario2 {
    margin-top: 5%;
    padding: 20px;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
    border-radius: .5rem;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background: white;
    border-radius: 10px;
}

.formulario2 {
    top: 50%;
    margin-bottom: 10px;
}

.formulario .img_logo, .formulario2 .img_logo {
    display: flex;
    height: 75px;
    text-align: center;
    padding: 10px 0 20px 0;
    border-bottom: 1px solid silver;
}

.formulario form, .formulario2 form {
    padding: 0 40px;
    box-sizing: border-box;
}

/* Aquí está el cambio para asegurar que la animación funcione */
.input-field {
    position: relative;
    border-bottom: 2px solid #adadad;
    margin: 20px 0 0 0;
}

.input-field input {
    width: 100%;
    padding: 0 5px;
    height: 40px;
    font-size: 16px;
    border: none;
    background: none;
    outline: none;
}

.input-field label {
    position: absolute;
    top: 20%;
    left: 5px;
    color: #adadad;
    transform: translateY(50%);
    font-size: 16px;
    pointer-events: none;
    transition: .5s;
}

.input-field input:focus ~ label,
.input-field input:valid ~ label {
    top: -20px;
    color: green;
}

.input-field input:focus ~ span::before,
.input-field input:valid ~ span::before {
    width: 100%;
}

.recordar, .registrarse {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.recordar a, .registrarse a {
    color: #449846;
    text-decoration: none;
}

.recordar a:hover, .registrarse a:hover {
    text-decoration: underline;
}

input[type="submit"] {
    width: 100%;
    height: 50px;
    border: 1px solid;
    background: #449846;
    border-radius: 25px;
    font-size: 18px;
    color: white;
    cursor: pointer;
    outline: none;
    margin: 25px 0 15px 0;
}

input[type="submit"]:hover {
    background: #56b558;
    transition: .5s;
}

.logout {
    padding: 7px;
    background: whitex;
    text-decoration: none;
    color: white;
    font-weight: bold;
}

@media (max-width: 768px) {
    .formulario, .formulario2 {
        width: 90%;
    }
}


/* Contenedor de los campos Provincia, Ciudad, País y Código Postal */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas */
    gap: 0 20px; /* Espacio entre columnas y filas */
}

/* Ajustes para que los campos ocupen el espacio correcto */
.grid-container .input-field {
    width: 100%;
}


/* FOOTER FIJO */
.footer {
    background-color: #449846; /* Verde */
    padding: 15px 0;
    text-align: center;
    width: 100%;
    position: fixed; /* Fijo en la parte inferior */
    bottom: 0;
    left: 0;
  }
  
.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 30px; /* Espaciado entre enlaces */
  }
  
.footer ul li {
    display: inline;
  }
  
.footer ul li a {
    color: white;
    text-decoration: none;
    font-size: 12px;
    transition: 0.3s;
  }
  
.footer ul li a:hover {
    text-decoration: underline;
  }
  
  /* Para evitar que el contenido quede tapado por el footer */
main {
    padding-bottom: 60px; /* Ajusta según la altura del footer */
  }