/**
 * Mammtech Corporation — Premium 3-Step Proposal Form
 * Modern, professional, conversion-optimized design
 */

/* ===== Section Background ===== */
.proposal-form-section {
    background: linear-gradient(135deg, #eef2ff 0%, #f0fdf9 50%, #f4f6fa 100%);
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
}

.proposal-form-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(49, 146, 174,0.06) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.proposal-form-section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(24, 162, 118,0.07) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.proposal-form-section .container {
    position: relative;
    z-index: 1;
}

/* ===== Form Intro ===== */
.form-intro {
    text-align: center;
    margin-bottom: 36px;
}

.form-intro h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.form-intro p {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto;
}

/* ===== Success Badges ===== */
.success-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.success-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 2px 12px rgba(49, 146, 174,0.09);
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid rgba(49, 146, 174,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.success-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(49, 146, 174,0.14);
}

.success-item i {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* ===== Form Container ===== */
.form-container {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

/* ===== Main Card ===== */
.proposal-form {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 44px 48px;
    border-radius: 20px;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 20px 60px rgba(49, 146, 174,0.09),
        0 0 0 1px rgba(49, 146, 174,0.06);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.proposal-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3192ae, #3eb9d6, #18a276);
    border-radius: 20px 20px 0 0;
}



/* ===== Section Header (icon + title inside steps) ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f3f8;
}

.section-header i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3192ae, #27748b);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(49, 146, 174,0.25);
}

.section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

/* ===== Form Grid ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Labels */
.form-group label {
    font-weight: 700;
    margin-bottom: 7px;
    color: #4a5568;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.required {
    color: #f56565;
    font-weight: 700;
}

/* Inputs, Selects, Textarea */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 2px solid #e8ecf4;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-dark);
    background: #f8faff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #c0caee;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(49, 146, 174,0.1),
        0 2px 8px rgba(49, 146, 174,0.08);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b0bbd4;
    font-size: 0.88rem;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%234a5568' d='M8 11L2 5h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 40px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.65;
}

.helper-text {
    font-size: 0.74rem;
    color: var(--text-light);
    margin-top: 6px;
    font-style: italic;
}

/* ===== Form Navigation Buttons ===== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #f0f4fa;
}

.form-navigation:has(> *:only-child) {
    justify-content: flex-end;
}

.form-navigation .btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
}



/* Submit button */
.btn-submit {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #18a276, #137d5a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 20px rgba(24, 162, 118,0.35);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(24, 162, 118,0.45);
    background: linear-gradient(135deg, #22c28e, #18a276);
}

.btn-submit i {
    font-size: 1rem;
    animation: rocketPulse 2s ease-in-out infinite;
}

@keyframes rocketPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ===== Privacy Note ===== */
.privacy-note {
    margin-top: 14px;
    font-size: 0.78rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.8;
}

.privacy-note i {
    color: var(--secondary-color);
}

/* ===== File Upload ===== */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-input {
    display: none;
}

.file-upload-box {
    border: 2.5px dashed #c0ccf0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: #f6f9ff;
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
}

.file-upload-wrapper:hover .file-upload-box,
.file-upload-wrapper.dragover .file-upload-box {
    background: rgba(49, 146, 174,0.07);
    border-color: var(--primary-color);
    transform: scale(1.01);
}

.file-upload-box i {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
    opacity: 0.7;
}

.file-upload-box span {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.file-name-display {
    margin-top: 10px;
    padding: 10px 14px;
    background: #edf7f2;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--secondary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Bottom Bar ===== */
.form-bottom-bar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
    margin-top: 28px;
}

.sidebar-card {
    background: white;
    padding: 24px 26px;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

.sidebar-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.sidebar-card h4 {
    font-size: 1rem;
    margin-bottom: 14px;
    color: var(--text-dark);
    font-weight: 700;
}

.next-steps-list {
    padding-left: 18px;
}

.next-steps-list li {
    margin-bottom: 10px;
    color: var(--text-light);
    line-height: 1.55;
    font-size: 0.88rem;
}

.next-steps-list li strong {
    color: var(--primary-color);
    font-weight: 700;
}

.testimonial-card {
    background: linear-gradient(135deg, rgba(49, 146, 174,0.04), rgba(24, 162, 118,0.06));
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.quote-icon {
    font-size: 2.2rem;
    color: var(--secondary-color);
    opacity: 0.3;
    margin-bottom: 12px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 0.92rem;
}

.testimonial-author {
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.82rem;
}

/* ===== Select2 — Soft Modern Integrations ===== */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection,
.select2-container--default .select2-selection--single {
    height: 40px !important;
    background: #f8faff !important;
    border: 2px solid #e8ecf4 !important;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    transition: all 0.25s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #c0caee !important;
    background: #fff !important;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
    border-color: var(--primary-color) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(49, 146, 174,0.1), 0 2px 8px rgba(49, 146, 174,0.08) !important;
    outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-dark);
    line-height: 36px !important;
    padding-left: 14px !important;
    font-size: 0.88rem !important;
    font-family: inherit;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #b0bbd4;
    font-size: 0.88rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 12px;
}

/* Dropdown Menu Softness */
.select2-dropdown {
    border: none;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
    z-index: 1060;
    overflow: hidden;
    margin-top: 4px;
}

.select2-search--dropdown {
    padding: 12px;
    background: #fafbfc;
    border-bottom: 1px solid #f0f3f8;
}

.select2-search--dropdown .select2-search__field {
    border: 2px solid #e8ecf4;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    transition: all 0.2s;
    outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #c0caee;
    box-shadow: 0 0 0 3px rgba(49, 146, 174,0.08);
}

.select2-results__option {
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--text-dark);
    transition: all 0.15s ease;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #f0f4ff;
    color: var(--primary-color);
    font-weight: 600;
}

.select2-results__group {
    background: #f8faff;
    color: #8898bb;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 10px 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-top: 1px solid #f0f3f8;
    border-bottom: 1px solid #f0f3f8;
    margin-top: 4px;
}
.select2-results__group:first-child {
    border-top: none;
    margin-top: 0;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .form-bottom-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-bottom-bar {
        padding-bottom: 80px; /* Prevent WhatsApp button overlap */
    }
    .proposal-form {
        padding: 28px 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .success-badges {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .form-container {
        max-width: 100%;
    }

    .form-progress {
        padding: 0 10px;
    }

    .step-label {
        font-size: 0.68rem;
    }

    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .form-navigation .btn {
        padding: 11px 20px;
        font-size: 0.85rem;
    }
}

/* ===== Compact Design Overrides ===== */
.proposal-form.compact-form {
    padding: 30px 36px;
    border-radius: 16px;
}
.compact-form .section-header {
    margin-bottom: 16px;
    padding-bottom: 10px;
    margin-top: 24px;
}
.compact-form .section-header:first-of-type {
    margin-top: 0;
}
.compact-form .section-header i {
    width: 34px; height: 34px; font-size: 0.9rem;
}
.compact-form .section-header h3 {
    font-size: 1rem;
}
.compact-form .form-grid {
    gap: 12px 16px;
}
.compact-form .form-group input, 
.compact-form .form-group select, 
.compact-form .form-group textarea {
    padding: 9px 14px;
    font-size: 0.88rem;
    border-radius: 8px;
}
.compact-form .form-group label {
    margin-bottom: 5px;
    font-size: 0.7rem;
}
.compact-form .form-group textarea {
    min-height: 70px;
}
.compact-form .file-upload-box {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
}
.compact-form .upload-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.compact-form .file-upload-box i {
    font-size: 1.6rem;
    margin-bottom: 0;
    color: var(--primary-color);
}
.compact-form .file-upload-box span {
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 600;
}
.compact-form .file-upload-box .helper-text {
    margin-top: 2px;
    margin-left: 0;
    font-size: 0.75rem;
    color: var(--text-light);
}
.upload-progress-container {
    height: 4px;
    background: #eef0f8;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}
.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3192ae, #3eb9d6);
    transition: width 0.3s ease;
}
.file-list-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.minimal-file-item {
    display: flex;
    align-items: center;
    background: #f8faff;
    border: 1px solid #e8ecf4;
    padding: 8px 12px;
    border-radius: 8px;
    gap: 12px;
    transition: all 0.2s;
}
.minimal-file-item:hover {
    border-color: #c0caee;
    background: #fff;
}
.minimal-file-item .file-icon {
    font-size: 1.2rem;
    color: #8898bb;
}
.minimal-file-item .file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.minimal-file-item .file-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.minimal-file-item .file-size {
    font-size: 0.7rem;
    color: var(--text-light);
}
.minimal-file-item .file-remove {
    color: #ff5252;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}
.minimal-file-item .file-remove:hover {
    transform: scale(1.1);
}

/* ===== Ultra-Small Mobile Devices (320px - 400px) ===== */
@media (max-width: 400px) {
    .proposal-form {
        padding: 24px 16px;
    }
    .proposal-form.compact-form {
        padding: 24px 16px;
        border-radius: 12px;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        padding: 10px 14px;
        font-size: 0.88rem;
    }
    .section-header i {
        width: 32px; height: 32px; font-size: 0.85rem;
    }
    .section-header h3 {
        font-size: 1rem;
    }
    .form-navigation {
        flex-direction: column;
        gap: 12px;
    }
    .btn-submit {
        width: 100%;
        padding: 14px;
        font-size: 0.95rem;
    }
    .compact-form .file-upload-box {
        padding: 14px 10px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}
