/* Global Variables for Consistent Design */
:root {
    --primary-color: #2C3E50;
    --secondary-color: #ECF0F1;
    --accent-color: #3498DB;
    --button-color: #2980B9;
    --text-color: #34495E;
    --background-color: #F7F9FA;
}

/* Reset & Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Container Styling */
.container {
    width: 100%;
    max-width: 700px;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 1rem;
}

/* Heading */
h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: var(--secondary-color);
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.3rem;
}

label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
input[type="file"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    margin-top: 0.3rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    background-color: #eef6fc;
}

/* Placeholder Styling */
input::placeholder,
textarea::placeholder {
    color: #999;
    font-size: 0.95rem;
}

/* Dynamic Field Styling */
.dynamic-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.dynamic-field input,
.dynamic-field textarea {
    flex: 1;
    margin-bottom: 0.5rem;
}

/* Button Styling */
button[type="button"] {
    background: var(--button-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

button[type="button"]:hover {
    background: #1a5980;
}

/* Remove Button for Dynamic Fields */
.remove-button {
    background-color: #e74c3c;
    margin-top: 5px;
}

.remove-button:hover {
    background-color: #c0392b;
}

/* Submit Button */
.submit-button {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    padding: 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background: #22313f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .form-section h2 {
        font-size: 1.1rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    input[type="file"] {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    button[type="button"] {
        font-size: 0.8rem;
    }

    .submit-button {
        font-size: 0.9rem;
    }

    /* Stack dynamic fields on smaller screens */
    .dynamic-field {
        flex-direction: column;
    }
}