/* Container for the two sections */
.container1 {
    margin-top: -20px; /* Adds space between the grid and the form */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Styling the entire form container */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 20px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Container to hold label and textarea in one row */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

/* Styling the custom file upload label */
.custom-file-upload {
    display: inline-block;
    background-color: #f4f4f4;
    padding: 12px;
    border-radius: 8px;
    border: 2px dashed #ddd;
    cursor: pointer;
    flex: 0 0 40%;
}

.custom-file-upload input[type="file"] {
    display: none;
}

.custom-file-upload img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.custom-file-upload:hover {
    background-color: #e0f7fa;
    border-color: #007bff;
}

.custom-file-upload:hover img {
    transform: scale(1.1);
}

/* Styling the description textarea */
textarea {
    flex: 1;
    height: 80px;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #ddd;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
    outline: none;
}

/* Styling the submit button */
input[type="submit"] {
    background: linear-gradient(45deg, rgba(128, 210, 204, 1), rgba(220, 240, 171, 1));
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="submit"]:hover {
    background: linear-gradient(45deg, rgba(220, 240, 171, 1), rgba(128, 210, 204, 1)); 
    box-shadow: 0 5px 15px rgba(0, 91, 187, 0.3);
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.modal img,
.modal video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.close-btn {
    background: linear-gradient(45deg, rgba(220, 240, 171, 1), rgba(128, 210, 204, 1)); 
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
}
.progress-container {
    width: 100%;
    background-color: #ddd;
    margin-top: 10px;
    display: none;
}

.progress-bar {
    width: 0%;
    height: 20px;
    background-color: #4caf50;
    text-align: center;
    line-height: 20px;
    color: white;
}

/* Preview Styles */
#previewContainer {
    margin-top: 15px;
    text-align: center;
}

#previewContainer img, 
#previewContainer video {
    max-width: 100%;
    max-height: 300px;
    display: none;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 10px;
}

/* Login Alert Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.modal-content button {
    justify-content: center;
    background-color:rgb(96, 154, 215);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Professional Mobile Styles */
@media (max-width: 767px) {
    .container1 {
        margin: 10px auto;
        padding: 0;
        max-width: 100%;
    }

    form {
        padding: 16px;
        margin: 0 auto;
        max-width: 100%;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 1px solid #e9ecef;
    }

    .form-row {
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 16px;
    }

    .custom-file-upload {
        width: 35%;
        flex: 0 0 35%;
        padding: 12px 8px;
        text-align: center;
        border-radius: 8px;
        display: flex;
        /* flex-direction: column; */
        align-items: center;
        justify-content: center;
        min-height: 80px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 2px dashed #dee2e6;
        transition: all 0.3s ease;
    }

    .custom-file-upload:hover {
        background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
        border-color: #2196f3;
        transform: translateY(-1px);
    }

    .custom-file-upload img {
        width: 32px;
        height: 32px;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    }

    .custom-file-upload div {
        font-size: 11px;
        margin-top: 6px;
        line-height: 1.3;
        text-align: center;
        color: #6c757d;
        font-weight: 500;
    }

    textarea {
        width: 65%;
        flex: 0 0 65%;
        height: 80px;
        font-size: 14px;
        padding: 12px;
        border-radius: 8px;
        resize: none;
        border: 2px solid #e9ecef;
        background-color: #ffffff;
        transition: all 0.3s ease;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    textarea:focus {
        border-color: #2196f3;
        box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
        outline: none;
    }

    textarea::placeholder {
        color: #adb5bd;
        font-style: italic;
    }

    input[type="submit"] {
        width: 100%;
        margin-top: 0;
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 8px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        font-weight: 600;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }

    input[type="submit"]:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

    input[type="submit"]:active {
        transform: translateY(0);
    }

    #previewContainer {
        margin-top: 16px;
        border-radius: 8px;
        overflow: hidden;
        background: #f8f9fa;
        padding: 8px;
    }

    #previewContainer img, 
    #previewContainer video {
        max-height: 200px;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* Progress bar styling */
    .progress-container {
        margin-top: 12px;
        border-radius: 6px;
        overflow: hidden;
        background: #e9ecef;
    }

    .progress-bar {
        background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
        border-radius: 6px;
        transition: width 0.3s ease;
    }
}
