* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 15px 20px 15px; /* Added side padding for mobile stability */
    font-family: 'Poppins', sans-serif;
}

/* Specific background for Evden Eve Nakliyat page */
body.evden-eve-bg {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/evden-eve-arka.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keep background fixed on scroll */
    color: white;
}

/* Specific background for Ofis Taşıma page */
body.ofis-tasima-bg {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/ofis-tasima-arka.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keep background fixed on scroll */
    color: white;
}

/* Specific background for Parça Eşya Taşıma page */
body.parca-esya-bg {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/parca-esya-arka.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keep background fixed on scroll */
    color: white;
}

.form-container {
    max-width: 800px;
    margin: auto; /* Centers horizontally and vertically due to flex parent */
    padding: 40px;
    /* padding-bottom: 120px; <-- REMOVED */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

/* Simplified Truck Progress Bar Styling */
.truck-progress-bar {
    position: relative;
    margin-bottom: 30px;
    padding: 20px 0;
}

.truck-track {
    position: relative;
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

#truck-icon {
    position: absolute;
    top: 50%;
    left: 0; /* Initial position, will be animated by GSAP */
    font-size: 24px; /* Fallback for non-image icons */
    color: #27ae60;
    transform: translateX(-50%) translateY(-50%); /* Center the icon on its 'left' coordinate */
    /* GSAP will animate the 'left' property */
}

.step-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.step-labels .step-label {
    flex: 1 1 0;
    text-align: center;
    font-size: 0.9rem;
    color: #a3a3a3;
    transition: color 0.4s ease;
    position: relative;
}

/* Align labels correctly with start and end of the track */
.step-labels .step-label:first-child { text-align: left; }
.step-labels .step-label:last-child { text-align: right; }


.step-labels .step-label.active {
    color: #000;
    font-weight: bold;
}

/* Confirmation Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 5rem;
    color: #27ae60; /* Green checkmark */
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.5s;
}

.form-step.active {
    display: block;
}

.step-title {
    font-size: 1.8rem;
    color: #34495e;
    margin-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* AutoComplete Width Fix */
.autoComplete_wrapper {
    width: 100%;
    display: block;
}

.autoComplete_wrapper > input {
    width: 100% !important;
    padding: 12px 15px !important;
    font-size: 1rem !important;
}

.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
    background-color: #fffafb;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.2);
}

/* Specific styling for Date and Time inputs */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    right: 15px;
    color: #3498db;
    font-size: 1.1rem;
    pointer-events: none;
}

.input-group input {
    padding-right: 45px !important;
    cursor: pointer;
    background-color: #fff !important;
}

@media (max-width: 768px) {
    .input-group input {
        height: 55px; /* Larger touch target */
        font-size: 1.1rem !important;
        border: 2px solid #ddd;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .input-group i {
        font-size: 1.3rem;
    }
}

.error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 5px;
    font-weight: 500;
    display: none; /* Controlled by JS */
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.checkbox-group label {
    font-weight: 500;
    margin-bottom: 15px;
}
.checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
}
.checkbox-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}
.checkbox-option label {
    margin-bottom: 0;
    font-weight: normal;
    flex: 1;
}


.form-group textarea#detaylar {
    min-height: 150px;
    resize: none; /* Prevent user from resizing */
    width: 100%; /* Make it full width */
}

/* Specific styling for the item list textarea in Parça Eşya Taşıma form */
.form-group textarea#item-list {
    min-height: 150px; /* Approximately 5 rows of text */
    resize: none;
    width: 100%;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.btn-prev, .btn-next, .btn-submit {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next, .btn-submit {
    background-color: #27ae60;
    color: white;
}
.btn-next:hover, .btn-submit:hover {
    background-color: #229954;
}

.btn-prev {
    background-color: #bdc3c7;
    color: #2c3e50;
}
.btn-prev:hover {
    background-color: #a6acaf;
}

/* Hide previous button on the first step */
.form-step:first-child .btn-prev {
    display: none;
}

/* On first step, make next button take full width */
.form-step:first-child .form-navigation {
    justify-content: flex-end;
}

/* --- Responsive Design for Forms --- */

@media (max-width: 768px) {
    body {
        /* Adjusted to account for the 60px fixed mobile nav */
        padding-top: 80px; 
    }

    .form-container {
        padding: 30px 20px;
        margin: 20px;
        width: auto;
    }

    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group input[type="email"],
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .btn-prev, .btn-next, .btn-submit {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px; /* Further adjust for very small screens */
    }
    
    .form-container {
        padding: 20px 15px;
        margin: 10px;
    }

    .form-title {
        font-size: 1.8rem;
    }

    .step-title {
        font-size: 1.5rem;
    }

    /* On small screens, hide the progress bar labels to save space */
    .truck-progress-bar .step-labels {
        display: none;
    }

    .truck-progress-bar {
        margin-bottom: 20px;
        padding: 10px 0;
    }

    .form-navigation {
        flex-direction: column;
        gap: 10px; /* Add space between stacked buttons */
    }

    .btn-prev, .btn-next, .btn-submit {
        width: 100%;
        border-radius: 8px; /* Straighten buttons slightly for a modern look */
    }

    /* Keep 'prev' button order correct when stacked */
    .form-navigation .btn-prev {
        order: 2; 
    }
    .form-navigation .btn-next, .form-navigation .btn-submit {
        order: 1;
    }
}
