html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
    margin-top: 10% !important;
    margin-bottom: 5% !important;
    text-align: center;
    background: rgba(171, 206, 241, 0.301);
    padding: 20px 15px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 80% !important;
    max-width: 550px !important; /* Ancho del formulario */
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}
/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

.navbar-brand .logo {
    max-width: 80px;
    height: auto;
}

.nav-link {
    margin: 0 10px;
    font-size: 16px;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #e67e22; /* Naranja */
}

.navbar-toggler {
    border: none;
}


/* Inputs */
.form-control {
    width: 85%; /* Cambiado de 50% a 85% - más ancho pero no todo el formulario */
    max-width: 450px; /* Añadido límite máximo */
    margin: 10px auto; /* Centrado automático */
    padding: 12px 15px; /* Aumentado el padding para mejor apariencia */
    border: 2px solid #3498db;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 15px; /* Aumentado ligeramente el tamaño de fuente */
    display: block; /* Para que el margin auto funcione */
}

/* Labels */
.form-label {
    display: block;
    text-align: center;
    margin-bottom: 8px;
    margin-left: 7.5%; /* Alineado con los inputs (100% - 85%) / 2 */
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

/* Textarea */
textarea.form-control {
    resize: vertical; /* Permitir redimensionar verticalmente */
    min-height: 100px; /* Altura mínima */
}

/* Submit Button */
button[type="submit"] {
    background-color: #3498db36;
    color: white;
    border: none;
    padding: 12px 24px; /* Aumentado el padding */
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px; /* Aumentado el tamaño de fuente */
    font-weight: 600;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background-color: #e67d2250;
    transform: scale(1.05);
}

/* Footer */
.footer {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    width: 100%;
    position: fixed;
    bottom: 0;
    z-index: 1000;
    color: #2c3e50;
    font-weight: bold;
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 35px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.whatsapp-button:hover {
    background-color: #1e9e52;
    transform: scale(1.1);
}

.whatsapp-button i {
    font-size: 35px;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MEDIA QUERIES CORREGIDAS ===== */

/* Tablet */
@media (max-width: 768px) {
    .container {
        flex: none !important; /* Quitar flex: 1 que causa el espacio extra */
        margin: 120px auto 20px auto !important;
        padding: 25px 15px;
        width: 95% !important;
        max-width: none !important;
        min-height: auto !important; /* Sin altura mínima */
    }

    .container h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .form-control {
        width: 100% !important;
        max-width: none !important;
        margin: 8px 0 !important;
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-label {
        text-align: left !important;
        margin-left: 0 !important;
        font-size: 15px;
    }

    button[type="submit"] {
        padding: 12px 25px;
        font-size: 15px;
        width: auto !important;
        max-width: none !important;
        margin-bottom: 0 !important; /* Sin margen inferior extra */
    }

    .whatsapp-button {
        width: 50px;
        height: 50px;
        bottom: 25px;
        right: 25px;
    }

    .whatsapp-button i {
        font-size: 24px;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .container {
        flex: none !important; /* Quitar flex: 1 que causa el espacio extra */
        margin: 100px auto 20px auto !important;
        padding: 20px 15px 20px 15px !important; /* Padding uniforme */
        width: 98% !important;
        border-radius: 12px;
        max-width: none !important;
        min-height: auto !important; /* Sin altura mínima */
    }

    .container h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .form-control {
        width: 100% !important;
        max-width: none !important;
        margin: 8px 0 !important;
        padding: 10px;
        font-size: 14px;
    }

    .form-label {
        text-align: left !important;
        margin-left: 0 !important;
        font-size: 14px;
        margin-bottom: 4px;
    }

    textarea.form-control {
        min-height: 100px;
    }

    button[type="submit"] {
        padding: 12px 20px;
        font-size: 14px;
        width: auto !important;
        max-width: none !important;
        margin-top: 15px !important;
        margin-bottom: 0 !important; /* Sin margen inferior extra */
    }

    .whatsapp-button {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-button i {
        font-size: 20px;
    }
}

/* Móvil muy pequeño */
@media (max-width: 320px) {
    .container {
        flex: none !important; /* Quitar flex: 1 que causa el espacio extra */
        margin: 90px auto 15px auto !important;
        padding: 15px 10px 15px 10px !important; /* Padding uniforme */
        width: 99% !important;
        max-width: none !important;
        min-height: auto !important; /* Sin altura mínima */
    }

    .container h2 {
        font-size: 1.2rem;
    }

    .form-control {
        width: 100% !important;
        max-width: none !important;
        margin: 8px 0 !important;
        padding: 8px;
        font-size: 13px;
    }

    .form-label {
        text-align: left !important;
        margin-left: 0 !important;
        font-size: 13px;
    }

    button[type="submit"] {
        padding: 10px 15px;
        font-size: 13px;
        width: auto !important;
        max-width: none !important;
        margin-top: 10px !important;
        margin-bottom: 0 !important; /* Sin margen inferior extra */
    }

    .whatsapp-button {
        width: 40px;
        height: 40px;
    }

    .whatsapp-button i {
        font-size: 18px;
    }
}
