.contact-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background-color: #fff;
    margin: 0 auto; /* Center the container */
    flex-direction: column-reverse; /* Reversed to put form first on mobile */
}

.info-section {
    background-color: #2196f3;
    color: #fff;
    padding: 30px 20px;
    width: 100%; /* Full width on mobile */
    display: flex;
    flex-direction: column;
}

.form-section {
    padding: 30px 20px;
    width: 100%; /* Full width on mobile */
    background-color: #fff;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.info-text {
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.social-media {
    margin-top: 30px;
}

.social-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.social-media .social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap; /* Allow wrapping for very small screens */
}

.social-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.form-row {
    display: flex;
    flex-direction: column; /* Stack fields on mobile */
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
}

.form-group {
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box; /* Include padding in width calculation */
}

.form-control:focus {
    outline: none;
    border-color: #2196f3;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #0b5ed7;
}

.contact-inner {
    background-color: whitesmoke;
    padding: 15px;
}

#contact {
    padding: 20px;
    left: 0;
    width: calc(100% - 40px); /* Ensures it takes full width minus padding */
    max-width: none; /* Remove max width constraint for better mobile experience */
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .contact-container {
        flex-direction: row; /* Switch back to row on desktop */
    }
    
    .info-section {
        width: 35%;
        padding: 50px 30px;
    }
    
    .form-section {
        width: 65%;
        padding: 40px;
    }
    
    .form-row {
        flex-direction: row;
        gap: 20px;
    }
    
    .section-title {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    #contact {
        padding: 50px;
        left: 75px;
        max-width: 1000px; /* Restore max width on desktop */
        width: calc(100% - 100px); /* Account for padding */
    }
}

/* Additional breakpoint for very small screens */
@media (max-width: 480px) {
    .section-title {
        font-size: 24px;
    }
    
    .info-text {
        font-size: 14px;
    }
    
    .contact-item {
        margin-bottom: 15px;
    }
    
    .icon-circle {
        width: 32px;
        height: 32px;
    }
    
    .form-control {
        padding: 10px 12px;
    }
    
    .submit-btn {
        padding: 12px;
    }

    #contact {
        padding: 15px;
        width: calc(100% - 30px);
    }
}

/* Fix for extra wide screens */
@media (min-width: 1200px) {
    .contact-container {
        max-width: 1200px;
    }
}