/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* Container */
.container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Form Styles */
.contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-form h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #222;
    text-align: center;
}

/* Form Row for Two Columns */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #444;
}

.form-group label.required::after {
    content: " *";
    color: #EC1E24;
    font-weight: 600;
}

/* Input Styles */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #666;
    background-color: #fff;
}

/* Phone Input Wrapper */
.phone-input-wrapper {
    display: flex;
    gap: 10px;
}

.phone-country-select {
    flex: 0 0 120px;
    padding: 12px 8px;
    font-size: 14px;
}

.phone-input-wrapper input[type="tel"] {
    flex: 1;
}

/* Select Dropdown Styles */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Textarea */
textarea {
    resize: vertical;
    min-height: 120px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background-color: #EC1E24;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Checkbox Group */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #EC1E24;
}

/* Checkbox Text */
.checkbox-text {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    user-select: none;
}

/* Custom Searchable Select Styles */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
}

.custom-select-trigger:hover {
    border-color: #999;
}

.custom-select.active .custom-select-trigger {
    border-color: #666;
    background-color: #fff;
}

.select-arrow {
    transition: transform 0.3s ease;
    color: #666;
}

.custom-select.active .select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
}

.custom-select.active .custom-select-dropdown {
    display: block;
}

.custom-select-search {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #eee;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    outline: none;
}

.custom-select-search:focus {
    background-color: #fafafa;
}

.custom-select-options {
    max-height: 240px;
    overflow-y: auto;
}

.custom-select-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.custom-select-option:hover {
    background-color: #f5f5f5;
}

.custom-select-option.selected {
    background-color: #e8e8e8;
    font-weight: 500;
}

.custom-select-option.hidden {
    display: none;
}

/* Phone country select specific width */
.phone-input-wrapper .custom-select-wrapper {
    flex: 0 0 140px;
}

/* Flag Icons Styling */
.fi {
    width: 1.33em;
    line-height: 1em;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.custom-select-trigger .fi,
.custom-select-option .fi {
    font-size: 16px;
}




/* Responsive Design */
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .phone-country-select {
        flex: 0 0 100px;
    }

    .phone-input-wrapper .custom-select-wrapper {
        flex: 0 0 110px;
    }
}