/* Estilo Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: url('https://twind.io/cl/wp-content/uploads/2023/06/seguridad-y-salud-de-los-trabajadores.webp') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Añadiendo un pseudo-elemento para la opacidad */
body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);  
    z-index: -1;  
}

/* Cabecera */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 51, 102, 0.9);
    color: white;
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.logo img {
    width: 180px;
    height: auto;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar-links,
.user-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.navbar-links li a,
.user-links li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-links li a:hover,
.user-links li a:hover {
    color: #f76b6b;
}

#menu {
    display: none;
    font-size: 2.5rem;
    cursor: pointer;
}

/* Menú desplegable */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #003366;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    list-style: none;
}

.dropdown-menu li {
    margin: 5px 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
}

.dropdown-menu li a:hover {
    background-color: #f76b6b;
    color: #f5f5f5;
}

/* Estilo para los formularios */
.form-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 25px;
    background-color: #f7f7f7;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    color: #003366;
    text-align: center;
    border: 2px solid #003366;
}

.form-container h1 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    font-weight: 150;
}

/* Formularios generales */
form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

form label {
    font-size: 1.1rem;
    font-weight: 50;
    color: #006699;
    margin-bottom: 6px;
    text-align: left;
}

form input {
    padding: 12px;
    font-size: 1.1rem;
    border: 2px solid #d1e1f1;
    border-radius: 0px;
    background-color: #ffffff;
    color: #333333;
    width: 100%;
    transition: border 0.3s ease;
}

form input:focus {
    border-color: #4a90e2;
    outline: none;
}

form button {
    padding: 12px;
    font-size: 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-color: #78b3f7;
    border-color: #4a90e2;
}

form button:hover {
    background-color: #0056b3;
}

/* Estilo para los checkboxes */
input[type="checkbox"] {
    width: 50px;
    height: 25px;
    border-radius: 50px;
    border: 2px solid #ddd;
    background-color: #ddd;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

input[type="checkbox"]:before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked:before {
    transform: translateX(25px);
}

input[type="checkbox"]:hover {
    border-color: #4CAF50;
    background-color: #b0e8b0;
}

input[type="checkbox"]:checked:hover {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.form-check input[type="checkbox"] {
    margin: 0;
    padding: 0;
}

/* Estilo para los campos de lista desplegable (select) */
form select {
    padding: 12px;
    font-size: 1.1rem;
    border: 2px solid #d1e1f1;
    border-radius: 6px;
    background-color: #ffffff;
    color: #333333;
    width: 100%;
    cursor: pointer;
    transition: border 0.3s ease;
}

form select:focus {
    border-color: #36bb1b;
    outline: none;
}

.form-error {
    color: red;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Estilo para los mensajes de error */
.error-message {
    color: #ff4d4d;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 6px;
    font-size: 1.1rem;
    margin-top: 8px;
}

/* Mensajes de éxito */
.messages-container {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
}

.message {
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* Estilo para mensajes de error */
.message.error {
    background-color: #f8d7da; /* Fondo rojo claro */
    color: #721c24; /* Texto rojo oscuro */
    border: 1px solid #f5c6cb; /* Borde rojo claro */
}

/* Estilo para los mensajes dentro del formulario */
.alert {
    padding: 18px;
    border-radius: 8px;
    font-size: 1.2rem;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.alert.error {
    color: #f01b04;
    background-color: #f8d1d1;
    border: 1px solid #f8c6c6;
}

.alert.success {
    color: #0d9c00;
    background-color: #e1fac1;
    border: 1px solid #c1e7a4;
}

.alert.warning {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
}

/* Pie de página */
footer {
    background-color: #003366;
    color: white;
    padding: 3rem 5%;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-contact h3,
.footer-socials h3 {
    color: #f76b6b;
    margin-bottom: 10px;
}

.footer-contact p,
.footer-socials a {
    color: white;
    font-size: 1rem;
    margin-bottom: 5px;
    text-decoration: none;
}

.footer-socials a:hover {
    color: #f76b6b;
}

.footer-bottom p {
    font-size: 1rem;
    margin-top: 10px;
}

/* Diseño principal */
main {
    padding-top: 90px;
}


@media (max-width: 480px) {
    .navbar-links {
        display: none;
        
    }
    .user-links {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .user-links li {
        display: block;
        text-align: center;
    }

    .user-links li a {
        color: white;
        font-size: 0.8rem;
        display: block;
        padding: 10px 0;
    }

    .user-links li a:hover {
        background-color: #f76b6b;
        color: white;
    }
    #menu {
        display: none;
    }
}