/* Reset básico */
body {
    margin: 0; /* Elimina el margen predeterminado */
    font-family: 'Arial', sans-serif;
    padding-top: 100px; /* Espacio para nav fijo */
}

nav {
    position: fixed;
    width: 100%;
    background-color: #8b2222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 100px;
    box-sizing: border-box;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* Logo */
.logo {
    height: 90px;
    width: auto;
    padding: 16px;
    border-radius: 16px;
    background-color: white;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

/* Menú */
.menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.menu li a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    padding: 0.5em 1em;
    border-radius: 8px;
    transition: 0.3s;
}

.menu li a:hover {
    background-color: white;
    color: #8b2222;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Responsive para móvil */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #8b2222;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.4s ease;
    }
    .menu.show {
        padding: 1rem 0;
        max-height: 300px;
        opacity: 1;
    }
    .menu li a {
        font-size: 1.2rem;
        padding: 0.75em 1.5em;
    }
    nav {
        flex-wrap: wrap;
        height: auto;
        justify-content: space-between;
    }
    .logo {
        height: 80px;
        padding: 16px;
        margin-top: 12px;
        margin-bottom: 12px;
        display: block;
        border-radius: 12px;
        background-color: white;
        text-align: center;
    }
}

/* Sección principal */
.seccion3 {
    display: flex;
    align-items: center;
    padding: 60px 10%;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.seccion3:nth-child(even) {
    flex-direction: row-reverse;
    background-color: #f9f9f9;
}

.texto {
    flex: 1 1 300px;
    padding: 20px;
    min-width: 280px;
}

.texto h2 {
    color: #8b2222;
}

.texto p, .texto ul {
    line-height: 1.6;
}

.imagen {
    flex: 1 1 300px;
    padding: 20px;
    min-width: 280px;
}

.imagen img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Botón volver */
.btn-volver {
    display: block;
    width: max-content;
    margin: 50px auto;
    background-color: #8b2222;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
}

/* Responsive menor a 768px */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    nav {
        height: 110px;
    }

    .seccion3 {
        display: block;
        margin-bottom: 2rem;
        padding: 30px 5%;
        text-align: center;
    }

    .texto, .imagen {
        flex: none;
        width: 100%;
        min-width: auto;
        padding: 10px 0;
    }

    .imagen img {
        max-width: 100%;
        height: auto;
    }

    .btn-volver {
        margin: 30px auto;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .texto h2 {
        font-size: 1.5rem;
    }
    .texto p, .texto ul {
        font-size: 0.9rem;
    }
    .btn-volver {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Estilos para formulario */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

input, textarea {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #8b2222;
    outline: none;
}

button {
    padding: 12px 20px;
    font-size: 1rem;
    background-color: #8b2222;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #8b2222;
}

label {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 8px;
}

p.instruction {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

.error {
    color: #8b2222;
    font-size: 0.9rem;
    margin-top: 5px;
}

.btn-volver {
    display: block;
    width: max-content;
    margin: 50px auto;
    background-color: #c62828;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-volver:hover{
     transform: translateY(-8px);
     box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}
button {
    padding: 12px 20px;
    font-size: 1rem;
    background-color: #c62828;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #b71c1c;
}