/* 1. Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ensures padding doesn't increase width */
    font-family: "Ubuntu", sans-serif;
}

body {
    background-color: #f0faff;
    min-height: 100vh;
}

/* 2. Responsive Header */
header {
    display: flex;
    justify-content: space-between; /* Pushes Logo to left, Nav to right */
    align-items: center;
    padding: 20px 5%; /* Responsive horizontal padding */
    color: #2761F5;
}

header h1 {
    font-size: 1.5rem;
}

/* 3. Navigation - Fixed the 900px margin issue */
ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 20px; /* Modern way to space items */
}

ul li a {
    text-decoration: none;
    color: #2761F5;
    font-weight: 500;
}

ul li a.active {
    padding: 10px 20px;
    border-radius: 50px;
    background-color: #2761F5;
    color: white;
    display: inline-block;
}

/* 4. Form Styling - Made Flexible */
.form-wrapper {
    width: 90%; /* Scale with screen width */
    max-width: 430px; /* Limits size on desktop */
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    /* Removed fixed height 550px to allow content to flow */
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #2761F5;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #2761F5; /* Matched your header color */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background-color: #1a4bc4;
}
/* Grouping these ensures all fields look and behave the same */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
    width: 100%; /* Fills the container */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background-color: white;
    
    /* CRITICAL FOR RESPONSIVENESS */
    box-sizing: border-box; 
    
    transition: border-color 0.3s ease;
}

textarea {
    min-height: 10px; /* Gives the user space to start typing */
    resize: vertical;  /* Allows user to stretch height, but prevents breaking width */
    font-family: inherit; /* Ensures it uses Ubuntu like the rest of the site */
}

textarea:focus {
    outline: none;
    border-color: #2761F5;
}

/* 5. Media Query for Mobile Devices */
@media (max-width: 600px) {
    header {
        flex-direction: column; /* Stack logo above nav on small phones */
        gap: 15px;
        text-align: center;
    }
    
    ul {
        gap: 15px;
    }

    ul li {
        margin-left: 0; /* Clear any leftover margins */
    }

    .form-wrapper {
        padding: 20px;
        margin: 20px auto;
    }
}